blob: 1e983fabe7cecb4ece0d12bcdbfe9cd41b53f83c [file]
/**
* Generated by the Emboss compiler. DO NOT EDIT!
*/
#ifndef TESTDATA_DIVISION_MODULUS_EMB_H_
#define TESTDATA_DIVISION_MODULUS_EMB_H_
#include <stdint.h>
#include <string.h>
#include <algorithm>
#include <type_traits>
#include <utility>
#include "runtime/cpp/emboss_cpp_util.h"
#include "runtime/cpp/emboss_enum_view.h"
#include "runtime/cpp/emboss_prelude.h"
#include "runtime/cpp/emboss_text_util.h"
/* NOLINTBEGIN */
namespace emboss {
namespace test {
namespace ArrayOfUint16BySizeInBytes {} // namespace ArrayOfUint16BySizeInBytes
template <class Storage>
class GenericArrayOfUint16BySizeInBytesView;
namespace ChunkedPayload {} // namespace ChunkedPayload
template <class Storage>
class GenericChunkedPayloadView;
namespace Constants {} // namespace Constants
template <class Storage>
class GenericConstantsView;
namespace SignedRuntimeDivision {} // namespace SignedRuntimeDivision
template <class Storage>
class GenericSignedRuntimeDivisionView;
namespace PayloadSizedByDivision {} // namespace PayloadSizedByDivision
template <class Storage>
class GenericPayloadSizedByDivisionView;
namespace FieldGatedByDivision {} // namespace FieldGatedByDivision
template <class Storage>
class GenericFieldGatedByDivisionView;
namespace CollapsingQuotient {} // namespace CollapsingQuotient
template <class Storage>
class GenericCollapsingQuotientView;
namespace ArrayOfUint16BySizeInBytes {} // namespace ArrayOfUint16BySizeInBytes
template <class View>
struct EmbossReservedInternalIsGenericArrayOfUint16BySizeInBytesView;
template <class Storage>
class GenericArrayOfUint16BySizeInBytesView final {
public:
GenericArrayOfUint16BySizeInBytesView() : backing_() {}
explicit GenericArrayOfUint16BySizeInBytesView(
Storage emboss_reserved_local_bytes)
: backing_(emboss_reserved_local_bytes) {}
template <typename OtherStorage>
GenericArrayOfUint16BySizeInBytesView(
const GenericArrayOfUint16BySizeInBytesView<OtherStorage>&
emboss_reserved_local_other)
: backing_{emboss_reserved_local_other.BackingStorage()} {}
template <typename Arg,
typename = typename ::std::enable_if<
!EmbossReservedInternalIsGenericArrayOfUint16BySizeInBytesView<
typename ::std::remove_cv<typename ::std::remove_reference<
Arg>::type>::type>::value>::type>
explicit GenericArrayOfUint16BySizeInBytesView(
Arg&& emboss_reserved_local_arg)
: backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {}
template <typename Arg0, typename Arg1, typename... Args>
explicit GenericArrayOfUint16BySizeInBytesView(
Arg0&& emboss_reserved_local_arg0, Arg1&& emboss_reserved_local_arg1,
Args&&... emboss_reserved_local_args)
: backing_(::std::forward<Arg0>(emboss_reserved_local_arg0),
::std::forward<Arg1>(emboss_reserved_local_arg1),
::std::forward<Args>(emboss_reserved_local_args)...) {}
template <typename OtherStorage>
GenericArrayOfUint16BySizeInBytesView<Storage>& operator=(
const GenericArrayOfUint16BySizeInBytesView<OtherStorage>&
emboss_reserved_local_other) {
backing_ = emboss_reserved_local_other.BackingStorage();
return *this;
}
bool Ok() const {
if (!IsComplete()) return false;
if (!has_size_in_bytes().Known()) return false;
if (has_size_in_bytes().ValueOrDefault() && !size_in_bytes().Ok())
return false;
if (!has_elements().Known()) return false;
if (has_elements().ValueOrDefault() && !elements().Ok()) return false;
if (!has_IntrinsicSizeInBytes().Known()) return false;
if (has_IntrinsicSizeInBytes().ValueOrDefault() &&
!IntrinsicSizeInBytes().Ok())
return false;
if (!has_MaxSizeInBytes().Known()) return false;
if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok())
return false;
if (!has_MinSizeInBytes().Known()) return false;
if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok())
return false;
return true;
}
Storage BackingStorage() const { return backing_; }
bool IsComplete() const {
return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) ||
(backing_.Ok() && IntrinsicSizeInBytes().Ok() &&
backing_.SizeInBytes() >=
static_cast</**/ ::std::size_t>(
IntrinsicSizeInBytes().UncheckedRead()));
}
::std::size_t SizeInBytes() const {
return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read());
}
bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); }
template <typename OtherStorage>
bool Equals(GenericArrayOfUint16BySizeInBytesView<OtherStorage>
emboss_reserved_local_other) const {
if (!has_size_in_bytes().Known()) return false;
if (!emboss_reserved_local_other.has_size_in_bytes().Known()) return false;
if (emboss_reserved_local_other.has_size_in_bytes().ValueOrDefault() &&
!has_size_in_bytes().ValueOrDefault())
return false;
if (has_size_in_bytes().ValueOrDefault() &&
!emboss_reserved_local_other.has_size_in_bytes().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_size_in_bytes().ValueOrDefault() &&
has_size_in_bytes().ValueOrDefault() &&
!size_in_bytes().Equals(emboss_reserved_local_other.size_in_bytes()))
return false;
if (!has_elements().Known()) return false;
if (!emboss_reserved_local_other.has_elements().Known()) return false;
if (emboss_reserved_local_other.has_elements().ValueOrDefault() &&
!has_elements().ValueOrDefault())
return false;
if (has_elements().ValueOrDefault() &&
!emboss_reserved_local_other.has_elements().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_elements().ValueOrDefault() &&
has_elements().ValueOrDefault() &&
!elements().Equals(emboss_reserved_local_other.elements()))
return false;
return true;
}
template <typename OtherStorage>
bool UncheckedEquals(GenericArrayOfUint16BySizeInBytesView<OtherStorage>
emboss_reserved_local_other) const {
if (emboss_reserved_local_other.has_size_in_bytes().ValueOr(false) &&
!has_size_in_bytes().ValueOr(false))
return false;
if (has_size_in_bytes().ValueOr(false) &&
!emboss_reserved_local_other.has_size_in_bytes().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_size_in_bytes().ValueOr(false) &&
has_size_in_bytes().ValueOr(false) &&
!size_in_bytes().UncheckedEquals(
emboss_reserved_local_other.size_in_bytes()))
return false;
if (emboss_reserved_local_other.has_elements().ValueOr(false) &&
!has_elements().ValueOr(false))
return false;
if (has_elements().ValueOr(false) &&
!emboss_reserved_local_other.has_elements().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_elements().ValueOr(false) &&
has_elements().ValueOr(false) &&
!elements().UncheckedEquals(emboss_reserved_local_other.elements()))
return false;
return true;
}
template <typename OtherStorage>
void UncheckedCopyFrom(GenericArrayOfUint16BySizeInBytesView<OtherStorage>
emboss_reserved_local_other) const {
backing_.UncheckedCopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead());
}
template <typename OtherStorage>
void CopyFrom(GenericArrayOfUint16BySizeInBytesView<OtherStorage>
emboss_reserved_local_other) const {
backing_.CopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().Read());
}
template <typename OtherStorage>
bool TryToCopyFrom(GenericArrayOfUint16BySizeInBytesView<OtherStorage>
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 <class Stream>
bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const {
::std::string emboss_reserved_local_brace;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_brace))
return false;
if (emboss_reserved_local_brace != "{") return false;
for (;;) {
::std::string emboss_reserved_local_name;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_name))
return false;
if (emboss_reserved_local_name == ",")
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_name))
return false;
if (emboss_reserved_local_name == "}") return true;
::std::string emboss_reserved_local_colon;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_colon))
return false;
if (emboss_reserved_local_colon != ":") return false;
if (emboss_reserved_local_name == "size_in_bytes") {
if (!size_in_bytes().UpdateFromTextStream(
emboss_reserved_local_stream)) {
return false;
}
continue;
}
if (emboss_reserved_local_name == "elements") {
if (!elements().UpdateFromTextStream(emboss_reserved_local_stream)) {
return false;
}
continue;
}
return false;
}
}
template <class Stream>
void WriteToTextStream(
Stream* emboss_reserved_local_stream,
::emboss::TextOutputOptions emboss_reserved_local_options) const {
::emboss::TextOutputOptions emboss_reserved_local_field_options =
emboss_reserved_local_options.PlusOneIndent();
if (emboss_reserved_local_options.multiline()) {
emboss_reserved_local_stream->Write("{\n");
} else {
emboss_reserved_local_stream->Write("{");
}
bool emboss_reserved_local_wrote_field = false;
if (has_size_in_bytes().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
size_in_bytes().IsAggregate() || size_in_bytes().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
} else {
if (emboss_reserved_local_wrote_field) {
emboss_reserved_local_stream->Write(",");
}
emboss_reserved_local_stream->Write(" ");
}
emboss_reserved_local_stream->Write("size_in_bytes: ");
size_in_bytes().WriteToTextStream(emboss_reserved_local_stream,
emboss_reserved_local_field_options);
emboss_reserved_local_wrote_field = true;
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write("\n");
}
} else if (emboss_reserved_local_field_options.allow_partial_output() &&
emboss_reserved_local_field_options.comments() &&
!size_in_bytes().IsAggregate() && !size_in_bytes().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
}
emboss_reserved_local_stream->Write("# size_in_bytes: UNREADABLE\n");
}
}
if (has_elements().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
elements().IsAggregate() || elements().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
} else {
if (emboss_reserved_local_wrote_field) {
emboss_reserved_local_stream->Write(",");
}
emboss_reserved_local_stream->Write(" ");
}
emboss_reserved_local_stream->Write("elements: ");
elements().WriteToTextStream(emboss_reserved_local_stream,
emboss_reserved_local_field_options);
emboss_reserved_local_wrote_field = true;
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write("\n");
}
} else if (emboss_reserved_local_field_options.allow_partial_output() &&
emboss_reserved_local_field_options.comments() &&
!elements().IsAggregate() && !elements().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
}
emboss_reserved_local_stream->Write("# elements: UNREADABLE\n");
}
}
(void)emboss_reserved_local_wrote_field;
if (emboss_reserved_local_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_options.current_indent());
emboss_reserved_local_stream->Write("}");
} else {
emboss_reserved_local_stream->Write(" }");
}
}
static constexpr bool IsAggregate() { return true; }
public:
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
8>>
size_in_bytes() const;
::emboss::support::Maybe<bool> has_size_in_bytes() const;
public:
typename ::emboss::support::GenericArrayView<
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
16, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType<
/**/ 0, 1>::template OffsetStorageType</**/ 2, 0>>,
16>>
,
typename Storage::template OffsetStorageType</**/ 0, 1>, 2, 8>
elements() const;
::emboss::support::Maybe<bool> has_elements() const;
public:
class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
const GenericArrayOfUint16BySizeInBytesView& emboss_reserved_local_view)
: view_(emboss_reserved_local_view) {}
EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = delete;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=(
const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=(
EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default;
::std::int32_t Read() const {
EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false));
auto emboss_reserved_local_value = MaybeRead();
EMBOSS_CHECK(emboss_reserved_local_value.Known());
EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault()));
return emboss_reserved_local_value.ValueOrDefault();
}
::std::int32_t UncheckedRead() const {
return MaybeRead().ValueOrDefault();
}
bool Ok() const {
auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known() &&
ValueIsOk(emboss_reserved_local_value.ValueOrDefault());
}
::emboss::support::Maybe<bool> IsUndefined() const {
const auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known()
? ::emboss::support::Maybe<bool>(false)
: (emboss_reserved_local_value.IsUndefined()
? ::emboss::support::Maybe<bool>(true)
: ::emboss::support::Maybe<bool>());
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
private:
::emboss::support::Maybe</**/ ::std::int32_t> MaybeRead() const {
const auto emboss_reserved_local_subexpr_1 = view_.size_in_bytes();
const auto emboss_reserved_local_subexpr_2 =
(emboss_reserved_local_subexpr_1.Ok()
? ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(
emboss_reserved_local_subexpr_1.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int32_t>());
const auto emboss_reserved_local_subexpr_3 =
::emboss::support::FlooringQuotient</**/ ::std::int32_t,
::std::int32_t, ::std::int32_t,
::std::int32_t>(
emboss_reserved_local_subexpr_2,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(2LL)));
const auto emboss_reserved_local_subexpr_4 =
::emboss::support::Product</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
emboss_reserved_local_subexpr_3,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(2LL)));
const auto emboss_reserved_local_subexpr_5 =
::emboss::support::Sum</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL)),
emboss_reserved_local_subexpr_4);
const auto emboss_reserved_local_subexpr_6 =
::emboss::support::Choice</**/ ::std::int32_t, ::std::int32_t, bool,
::std::int32_t, ::std::int32_t>(
::emboss::support::Maybe</**/ bool>(true),
emboss_reserved_local_subexpr_5,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL)));
const auto emboss_reserved_local_subexpr_7 =
::emboss::support::Maximum</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t,
::std::int32_t>(
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL)),
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL)),
emboss_reserved_local_subexpr_6);
return emboss_reserved_local_subexpr_7;
}
static constexpr bool ValueIsOk(
::std::int32_t emboss_reserved_local_value) {
return (void)emboss_reserved_local_value, // Silence -Wunused-parameter
::emboss::support::Maybe<bool>(true).ValueOr(false);
}
const GenericArrayOfUint16BySizeInBytesView view_;
};
EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes()
const;
::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() const;
public:
class EmbossReservedDollarVirtualMaxSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {}
EmbossReservedDollarVirtualMaxSizeInBytesView(
const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView(
EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView& operator=(
const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView& operator=(
EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualMaxSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView
MaxSizeInBytes() {
return EmbossReservedDollarVirtualMaxSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedDollarVirtualMinSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {}
EmbossReservedDollarVirtualMinSizeInBytesView(
const EmbossReservedDollarVirtualMinSizeInBytesView&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView(
EmbossReservedDollarVirtualMinSizeInBytesView&&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView& operator=(
const EmbossReservedDollarVirtualMinSizeInBytesView&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView& operator=(
EmbossReservedDollarVirtualMinSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualMinSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualMinSizeInBytesView
MinSizeInBytes() {
return EmbossReservedDollarVirtualMinSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
private:
Storage backing_;
template <class OtherStorage>
friend class GenericArrayOfUint16BySizeInBytesView;
};
using ArrayOfUint16BySizeInBytesView = GenericArrayOfUint16BySizeInBytesView<
/**/ ::emboss::support::ReadOnlyContiguousBuffer>;
using ArrayOfUint16BySizeInBytesWriter = GenericArrayOfUint16BySizeInBytesView<
/**/ ::emboss::support::ReadWriteContiguousBuffer>;
template <class View>
struct EmbossReservedInternalIsGenericArrayOfUint16BySizeInBytesView {
static constexpr const bool value = false;
};
template <class Storage>
struct EmbossReservedInternalIsGenericArrayOfUint16BySizeInBytesView<
GenericArrayOfUint16BySizeInBytesView<Storage>> {
static constexpr const bool value = true;
};
template <typename T>
inline GenericArrayOfUint16BySizeInBytesView<
/**/ ::emboss::support::ContiguousBuffer<
typename ::std::remove_reference<
decltype(*::std::declval<T>()->data())>::type,
1, 0>>
MakeArrayOfUint16BySizeInBytesView(T&& emboss_reserved_local_arg) {
return GenericArrayOfUint16BySizeInBytesView<
/**/ ::emboss::support::ContiguousBuffer<
typename ::std::remove_reference<
decltype(*::std::declval<T>()->data())>::type,
1, 0>>(::std::forward<T>(emboss_reserved_local_arg));
}
template <typename T>
inline GenericArrayOfUint16BySizeInBytesView<
/**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>
MakeArrayOfUint16BySizeInBytesView(T* emboss_reserved_local_data,
::std::size_t emboss_reserved_local_size) {
return GenericArrayOfUint16BySizeInBytesView<
/**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>(
emboss_reserved_local_data, emboss_reserved_local_size);
}
template <typename T, ::std::size_t kAlignment>
inline GenericArrayOfUint16BySizeInBytesView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>
MakeAlignedArrayOfUint16BySizeInBytesView(
T* emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) {
return GenericArrayOfUint16BySizeInBytesView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>(
emboss_reserved_local_data, emboss_reserved_local_size);
}
namespace ChunkedPayload {} // namespace ChunkedPayload
template <class View>
struct EmbossReservedInternalIsGenericChunkedPayloadView;
template <class Storage>
class GenericChunkedPayloadView final {
public:
GenericChunkedPayloadView() : backing_() {}
explicit GenericChunkedPayloadView(Storage emboss_reserved_local_bytes)
: backing_(emboss_reserved_local_bytes) {}
template <typename OtherStorage>
GenericChunkedPayloadView(const GenericChunkedPayloadView<OtherStorage>&
emboss_reserved_local_other)
: backing_{emboss_reserved_local_other.BackingStorage()} {}
template <typename Arg,
typename = typename ::std::enable_if<
!EmbossReservedInternalIsGenericChunkedPayloadView<
typename ::std::remove_cv<typename ::std::remove_reference<
Arg>::type>::type>::value>::type>
explicit GenericChunkedPayloadView(Arg&& emboss_reserved_local_arg)
: backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {}
template <typename Arg0, typename Arg1, typename... Args>
explicit GenericChunkedPayloadView(Arg0&& emboss_reserved_local_arg0,
Arg1&& emboss_reserved_local_arg1,
Args&&... emboss_reserved_local_args)
: backing_(::std::forward<Arg0>(emboss_reserved_local_arg0),
::std::forward<Arg1>(emboss_reserved_local_arg1),
::std::forward<Args>(emboss_reserved_local_args)...) {}
template <typename OtherStorage>
GenericChunkedPayloadView<Storage>& operator=(
const GenericChunkedPayloadView<OtherStorage>&
emboss_reserved_local_other) {
backing_ = emboss_reserved_local_other.BackingStorage();
return *this;
}
bool Ok() const {
if (!IsComplete()) return false;
if (!has_chunk_count().Known()) return false;
if (has_chunk_count().ValueOrDefault() && !chunk_count().Ok()) return false;
if (!has_padded().Known()) return false;
if (has_padded().ValueOrDefault() && !padded().Ok()) return false;
if (!has_IntrinsicSizeInBytes().Known()) return false;
if (has_IntrinsicSizeInBytes().ValueOrDefault() &&
!IntrinsicSizeInBytes().Ok())
return false;
if (!has_MaxSizeInBytes().Known()) return false;
if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok())
return false;
if (!has_MinSizeInBytes().Known()) return false;
if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok())
return false;
return true;
}
Storage BackingStorage() const { return backing_; }
bool IsComplete() const {
return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) ||
(backing_.Ok() && IntrinsicSizeInBytes().Ok() &&
backing_.SizeInBytes() >=
static_cast</**/ ::std::size_t>(
IntrinsicSizeInBytes().UncheckedRead()));
}
::std::size_t SizeInBytes() const {
return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read());
}
bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); }
template <typename OtherStorage>
bool Equals(GenericChunkedPayloadView<OtherStorage>
emboss_reserved_local_other) const {
if (!has_chunk_count().Known()) return false;
if (!emboss_reserved_local_other.has_chunk_count().Known()) return false;
if (emboss_reserved_local_other.has_chunk_count().ValueOrDefault() &&
!has_chunk_count().ValueOrDefault())
return false;
if (has_chunk_count().ValueOrDefault() &&
!emboss_reserved_local_other.has_chunk_count().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_chunk_count().ValueOrDefault() &&
has_chunk_count().ValueOrDefault() &&
!chunk_count().Equals(emboss_reserved_local_other.chunk_count()))
return false;
if (!has_padded().Known()) return false;
if (!emboss_reserved_local_other.has_padded().Known()) return false;
if (emboss_reserved_local_other.has_padded().ValueOrDefault() &&
!has_padded().ValueOrDefault())
return false;
if (has_padded().ValueOrDefault() &&
!emboss_reserved_local_other.has_padded().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_padded().ValueOrDefault() &&
has_padded().ValueOrDefault() &&
!padded().Equals(emboss_reserved_local_other.padded()))
return false;
return true;
}
template <typename OtherStorage>
bool UncheckedEquals(GenericChunkedPayloadView<OtherStorage>
emboss_reserved_local_other) const {
if (emboss_reserved_local_other.has_chunk_count().ValueOr(false) &&
!has_chunk_count().ValueOr(false))
return false;
if (has_chunk_count().ValueOr(false) &&
!emboss_reserved_local_other.has_chunk_count().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_chunk_count().ValueOr(false) &&
has_chunk_count().ValueOr(false) &&
!chunk_count().UncheckedEquals(
emboss_reserved_local_other.chunk_count()))
return false;
if (emboss_reserved_local_other.has_padded().ValueOr(false) &&
!has_padded().ValueOr(false))
return false;
if (has_padded().ValueOr(false) &&
!emboss_reserved_local_other.has_padded().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_padded().ValueOr(false) &&
has_padded().ValueOr(false) &&
!padded().UncheckedEquals(emboss_reserved_local_other.padded()))
return false;
return true;
}
template <typename OtherStorage>
void UncheckedCopyFrom(GenericChunkedPayloadView<OtherStorage>
emboss_reserved_local_other) const {
backing_.UncheckedCopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead());
}
template <typename OtherStorage>
void CopyFrom(GenericChunkedPayloadView<OtherStorage>
emboss_reserved_local_other) const {
backing_.CopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().Read());
}
template <typename OtherStorage>
bool TryToCopyFrom(GenericChunkedPayloadView<OtherStorage>
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 <class Stream>
bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const {
::std::string emboss_reserved_local_brace;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_brace))
return false;
if (emboss_reserved_local_brace != "{") return false;
for (;;) {
::std::string emboss_reserved_local_name;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_name))
return false;
if (emboss_reserved_local_name == ",")
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_name))
return false;
if (emboss_reserved_local_name == "}") return true;
::std::string emboss_reserved_local_colon;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_colon))
return false;
if (emboss_reserved_local_colon != ":") return false;
if (emboss_reserved_local_name == "chunk_count") {
if (!chunk_count().UpdateFromTextStream(emboss_reserved_local_stream)) {
return false;
}
continue;
}
if (emboss_reserved_local_name == "padded") {
if (!padded().UpdateFromTextStream(emboss_reserved_local_stream)) {
return false;
}
continue;
}
return false;
}
}
template <class Stream>
void WriteToTextStream(
Stream* emboss_reserved_local_stream,
::emboss::TextOutputOptions emboss_reserved_local_options) const {
::emboss::TextOutputOptions emboss_reserved_local_field_options =
emboss_reserved_local_options.PlusOneIndent();
if (emboss_reserved_local_options.multiline()) {
emboss_reserved_local_stream->Write("{\n");
} else {
emboss_reserved_local_stream->Write("{");
}
bool emboss_reserved_local_wrote_field = false;
if (has_chunk_count().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
chunk_count().IsAggregate() || chunk_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("chunk_count: ");
chunk_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() &&
!chunk_count().IsAggregate() && !chunk_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("# chunk_count: UNREADABLE\n");
}
}
if (has_padded().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
padded().IsAggregate() || padded().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
} else {
if (emboss_reserved_local_wrote_field) {
emboss_reserved_local_stream->Write(",");
}
emboss_reserved_local_stream->Write(" ");
}
emboss_reserved_local_stream->Write("padded: ");
padded().WriteToTextStream(emboss_reserved_local_stream,
emboss_reserved_local_field_options);
emboss_reserved_local_wrote_field = true;
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write("\n");
}
} else if (emboss_reserved_local_field_options.allow_partial_output() &&
emboss_reserved_local_field_options.comments() &&
!padded().IsAggregate() && !padded().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
}
emboss_reserved_local_stream->Write("# padded: 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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
8>>
chunk_count() const;
::emboss::support::Maybe<bool> has_chunk_count() const;
public:
typename ::emboss::support::GenericArrayView<
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType<
/**/ 0, 1>::template OffsetStorageType</**/ 1, 0>>,
8>>
,
typename Storage::template OffsetStorageType</**/ 0, 1>, 1, 8>
padded() const;
::emboss::support::Maybe<bool> has_padded() const;
public:
class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
const GenericChunkedPayloadView& emboss_reserved_local_view)
: view_(emboss_reserved_local_view) {}
EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = delete;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=(
const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=(
EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default;
::std::int32_t Read() const {
EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false));
auto emboss_reserved_local_value = MaybeRead();
EMBOSS_CHECK(emboss_reserved_local_value.Known());
EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault()));
return emboss_reserved_local_value.ValueOrDefault();
}
::std::int32_t UncheckedRead() const {
return MaybeRead().ValueOrDefault();
}
bool Ok() const {
auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known() &&
ValueIsOk(emboss_reserved_local_value.ValueOrDefault());
}
::emboss::support::Maybe<bool> IsUndefined() const {
const auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known()
? ::emboss::support::Maybe<bool>(false)
: (emboss_reserved_local_value.IsUndefined()
? ::emboss::support::Maybe<bool>(true)
: ::emboss::support::Maybe<bool>());
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
private:
::emboss::support::Maybe</**/ ::std::int32_t> MaybeRead() const {
const auto emboss_reserved_local_subexpr_1 = view_.chunk_count();
const auto emboss_reserved_local_subexpr_2 =
(emboss_reserved_local_subexpr_1.Ok()
? ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(
emboss_reserved_local_subexpr_1.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int32_t>());
const auto emboss_reserved_local_subexpr_3 =
::emboss::support::Sum</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
emboss_reserved_local_subexpr_2,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(3LL)));
const auto emboss_reserved_local_subexpr_4 =
::emboss::support::FlooringQuotient</**/ ::std::int32_t,
::std::int32_t, ::std::int32_t,
::std::int32_t>(
emboss_reserved_local_subexpr_3,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(4LL)));
const auto emboss_reserved_local_subexpr_5 =
::emboss::support::Product</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
emboss_reserved_local_subexpr_4,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(4LL)));
const auto emboss_reserved_local_subexpr_6 =
::emboss::support::Sum</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL)),
emboss_reserved_local_subexpr_5);
const auto emboss_reserved_local_subexpr_7 =
::emboss::support::Choice</**/ ::std::int32_t, ::std::int32_t, bool,
::std::int32_t, ::std::int32_t>(
::emboss::support::Maybe</**/ bool>(true),
emboss_reserved_local_subexpr_6,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL)));
const auto emboss_reserved_local_subexpr_8 =
::emboss::support::Maximum</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t,
::std::int32_t>(
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL)),
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL)),
emboss_reserved_local_subexpr_7);
return emboss_reserved_local_subexpr_8;
}
static constexpr bool ValueIsOk(
::std::int32_t emboss_reserved_local_value) {
return (void)emboss_reserved_local_value, // Silence -Wunused-parameter
::emboss::support::Maybe<bool>(true).ValueOr(false);
}
const GenericChunkedPayloadView view_;
};
EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes()
const;
::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() const;
public:
class EmbossReservedDollarVirtualMaxSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {}
EmbossReservedDollarVirtualMaxSizeInBytesView(
const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView(
EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView& operator=(
const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView& operator=(
EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualMaxSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView
MaxSizeInBytes() {
return EmbossReservedDollarVirtualMaxSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedDollarVirtualMinSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {}
EmbossReservedDollarVirtualMinSizeInBytesView(
const EmbossReservedDollarVirtualMinSizeInBytesView&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView(
EmbossReservedDollarVirtualMinSizeInBytesView&&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView& operator=(
const EmbossReservedDollarVirtualMinSizeInBytesView&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView& operator=(
EmbossReservedDollarVirtualMinSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualMinSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualMinSizeInBytesView
MinSizeInBytes() {
return EmbossReservedDollarVirtualMinSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
private:
Storage backing_;
template <class OtherStorage>
friend class GenericChunkedPayloadView;
};
using ChunkedPayloadView =
GenericChunkedPayloadView</**/ ::emboss::support::ReadOnlyContiguousBuffer>;
using ChunkedPayloadWriter = GenericChunkedPayloadView<
/**/ ::emboss::support::ReadWriteContiguousBuffer>;
template <class View>
struct EmbossReservedInternalIsGenericChunkedPayloadView {
static constexpr const bool value = false;
};
template <class Storage>
struct EmbossReservedInternalIsGenericChunkedPayloadView<
GenericChunkedPayloadView<Storage>> {
static constexpr const bool value = true;
};
template <typename T>
inline GenericChunkedPayloadView<
/**/ ::emboss::support::ContiguousBuffer<
typename ::std::remove_reference<
decltype(*::std::declval<T>()->data())>::type,
1, 0>>
MakeChunkedPayloadView(T&& emboss_reserved_local_arg) {
return GenericChunkedPayloadView<
/**/ ::emboss::support::ContiguousBuffer<
typename ::std::remove_reference<
decltype(*::std::declval<T>()->data())>::type,
1, 0>>(::std::forward<T>(emboss_reserved_local_arg));
}
template <typename T>
inline GenericChunkedPayloadView<
/**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>
MakeChunkedPayloadView(T* emboss_reserved_local_data,
::std::size_t emboss_reserved_local_size) {
return GenericChunkedPayloadView<
/**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>(
emboss_reserved_local_data, emboss_reserved_local_size);
}
template <typename T, ::std::size_t kAlignment>
inline GenericChunkedPayloadView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>
MakeAlignedChunkedPayloadView(T* emboss_reserved_local_data,
::std::size_t emboss_reserved_local_size) {
return GenericChunkedPayloadView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>(
emboss_reserved_local_data, emboss_reserved_local_size);
}
namespace Constants {} // namespace Constants
template <class View>
struct EmbossReservedInternalIsGenericConstantsView;
template <class Storage>
class GenericConstantsView final {
public:
GenericConstantsView() : backing_() {}
explicit GenericConstantsView(Storage emboss_reserved_local_bytes)
: backing_(emboss_reserved_local_bytes) {}
template <typename OtherStorage>
GenericConstantsView(
const GenericConstantsView<OtherStorage>& emboss_reserved_local_other)
: backing_{emboss_reserved_local_other.BackingStorage()} {}
template <typename Arg,
typename = typename ::std::enable_if<
!EmbossReservedInternalIsGenericConstantsView<
typename ::std::remove_cv<typename ::std::remove_reference<
Arg>::type>::type>::value>::type>
explicit GenericConstantsView(Arg&& emboss_reserved_local_arg)
: backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {}
template <typename Arg0, typename Arg1, typename... Args>
explicit GenericConstantsView(Arg0&& emboss_reserved_local_arg0,
Arg1&& emboss_reserved_local_arg1,
Args&&... emboss_reserved_local_args)
: backing_(::std::forward<Arg0>(emboss_reserved_local_arg0),
::std::forward<Arg1>(emboss_reserved_local_arg1),
::std::forward<Args>(emboss_reserved_local_args)...) {}
template <typename OtherStorage>
GenericConstantsView<Storage>& operator=(
const GenericConstantsView<OtherStorage>& emboss_reserved_local_other) {
backing_ = emboss_reserved_local_other.BackingStorage();
return *this;
}
bool Ok() const {
if (!IsComplete()) return false;
if (!has_exact_quotient().Known()) return false;
if (has_exact_quotient().ValueOrDefault() && !exact_quotient().Ok())
return false;
if (!has_truncating_quotient().Known()) return false;
if (has_truncating_quotient().ValueOrDefault() &&
!truncating_quotient().Ok())
return false;
if (!has_negative_quotient().Known()) return false;
if (has_negative_quotient().ValueOrDefault() && !negative_quotient().Ok())
return false;
if (!has_exact_modulus().Known()) return false;
if (has_exact_modulus().ValueOrDefault() && !exact_modulus().Ok())
return false;
if (!has_truncating_modulus().Known()) return false;
if (has_truncating_modulus().ValueOrDefault() && !truncating_modulus().Ok())
return false;
if (!has_negative_modulus().Known()) return false;
if (has_negative_modulus().ValueOrDefault() && !negative_modulus().Ok())
return false;
if (!has_chained_div().Known()) return false;
if (has_chained_div().ValueOrDefault() && !chained_div().Ok()) return false;
if (!has_chained_mod().Known()) return false;
if (has_chained_mod().ValueOrDefault() && !chained_mod().Ok()) return false;
if (!has_mixed_divmod().Known()) return false;
if (has_mixed_divmod().ValueOrDefault() && !mixed_divmod().Ok())
return false;
if (!has_IntrinsicSizeInBytes().Known()) return false;
if (has_IntrinsicSizeInBytes().ValueOrDefault() &&
!IntrinsicSizeInBytes().Ok())
return false;
if (!has_MaxSizeInBytes().Known()) return false;
if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok())
return false;
if (!has_MinSizeInBytes().Known()) return false;
if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok())
return false;
return true;
}
Storage BackingStorage() const { return backing_; }
bool IsComplete() const {
return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) ||
(backing_.Ok() && IntrinsicSizeInBytes().Ok() &&
backing_.SizeInBytes() >=
static_cast</**/ ::std::size_t>(
IntrinsicSizeInBytes().UncheckedRead()));
}
static constexpr ::std::size_t SizeInBytes() {
return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read());
}
static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); }
template <typename OtherStorage>
bool Equals(
GenericConstantsView<OtherStorage> emboss_reserved_local_other) const {
return true;
}
template <typename OtherStorage>
bool UncheckedEquals(
GenericConstantsView<OtherStorage> emboss_reserved_local_other) const {
return true;
}
template <typename OtherStorage>
void UncheckedCopyFrom(
GenericConstantsView<OtherStorage> emboss_reserved_local_other) const {
backing_.UncheckedCopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead());
}
template <typename OtherStorage>
void CopyFrom(
GenericConstantsView<OtherStorage> emboss_reserved_local_other) const {
backing_.CopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().Read());
}
template <typename OtherStorage>
bool TryToCopyFrom(
GenericConstantsView<OtherStorage> 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 <class Stream>
bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const {
::std::string emboss_reserved_local_brace;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_brace))
return false;
if (emboss_reserved_local_brace != "{") return false;
for (;;) {
::std::string emboss_reserved_local_name;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_name))
return false;
if (emboss_reserved_local_name == ",")
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_name))
return false;
if (emboss_reserved_local_name == "}") return true;
::std::string emboss_reserved_local_colon;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_colon))
return false;
if (emboss_reserved_local_colon != ":") return false;
return false;
}
}
template <class Stream>
void WriteToTextStream(
Stream* emboss_reserved_local_stream,
::emboss::TextOutputOptions emboss_reserved_local_options) const {
::emboss::TextOutputOptions emboss_reserved_local_field_options =
emboss_reserved_local_options.PlusOneIndent();
if (emboss_reserved_local_options.multiline()) {
emboss_reserved_local_stream->Write("{\n");
} else {
emboss_reserved_local_stream->Write("{");
}
bool emboss_reserved_local_wrote_field = false;
if (has_exact_quotient().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
exact_quotient().IsAggregate() || exact_quotient().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write("# exact_quotient: ");
exact_quotient().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("# exact_quotient: UNREADABLE\n");
}
}
if (has_truncating_quotient().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
truncating_quotient().IsAggregate() || truncating_quotient().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write("# truncating_quotient: ");
truncating_quotient().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(
"# truncating_quotient: UNREADABLE\n");
}
}
if (has_negative_quotient().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
negative_quotient().IsAggregate() || negative_quotient().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write("# negative_quotient: ");
negative_quotient().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(
"# negative_quotient: UNREADABLE\n");
}
}
if (has_exact_modulus().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
exact_modulus().IsAggregate() || exact_modulus().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write("# exact_modulus: ");
exact_modulus().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("# exact_modulus: UNREADABLE\n");
}
}
if (has_truncating_modulus().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
truncating_modulus().IsAggregate() || truncating_modulus().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write("# truncating_modulus: ");
truncating_modulus().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(
"# truncating_modulus: UNREADABLE\n");
}
}
if (has_negative_modulus().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
negative_modulus().IsAggregate() || negative_modulus().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write("# negative_modulus: ");
negative_modulus().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("# negative_modulus: UNREADABLE\n");
}
}
if (has_chained_div().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
chained_div().IsAggregate() || chained_div().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write("# chained_div: ");
chained_div().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("# chained_div: UNREADABLE\n");
}
}
if (has_chained_mod().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
chained_mod().IsAggregate() || chained_mod().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write("# chained_mod: ");
chained_mod().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("# chained_mod: UNREADABLE\n");
}
}
if (has_mixed_divmod().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
mixed_divmod().IsAggregate() || mixed_divmod().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write("# mixed_divmod: ");
mixed_divmod().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("# mixed_divmod: UNREADABLE\n");
}
}
(void)emboss_reserved_local_wrote_field;
if (emboss_reserved_local_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_options.current_indent());
emboss_reserved_local_stream->Write("}");
} else {
emboss_reserved_local_stream->Write(" }");
}
}
static constexpr bool IsAggregate() { return true; }
public:
class EmbossReservedVirtualExactQuotientView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedVirtualExactQuotientView() {}
EmbossReservedVirtualExactQuotientView(
const EmbossReservedVirtualExactQuotientView&) = default;
EmbossReservedVirtualExactQuotientView(
EmbossReservedVirtualExactQuotientView&&) = default;
EmbossReservedVirtualExactQuotientView& operator=(
const EmbossReservedVirtualExactQuotientView&) = default;
EmbossReservedVirtualExactQuotientView& operator=(
EmbossReservedVirtualExactQuotientView&&) = default;
~EmbossReservedVirtualExactQuotientView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedVirtualExactQuotientView exact_quotient() {
return EmbossReservedVirtualExactQuotientView();
}
static constexpr ::emboss::support::Maybe<bool> has_exact_quotient() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedVirtualTruncatingQuotientView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedVirtualTruncatingQuotientView() {}
EmbossReservedVirtualTruncatingQuotientView(
const EmbossReservedVirtualTruncatingQuotientView&) = default;
EmbossReservedVirtualTruncatingQuotientView(
EmbossReservedVirtualTruncatingQuotientView&&) = default;
EmbossReservedVirtualTruncatingQuotientView& operator=(
const EmbossReservedVirtualTruncatingQuotientView&) = default;
EmbossReservedVirtualTruncatingQuotientView& operator=(
EmbossReservedVirtualTruncatingQuotientView&&) = default;
~EmbossReservedVirtualTruncatingQuotientView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedVirtualTruncatingQuotientView
truncating_quotient() {
return EmbossReservedVirtualTruncatingQuotientView();
}
static constexpr ::emboss::support::Maybe<bool> has_truncating_quotient() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedVirtualNegativeQuotientView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedVirtualNegativeQuotientView() {}
EmbossReservedVirtualNegativeQuotientView(
const EmbossReservedVirtualNegativeQuotientView&) = default;
EmbossReservedVirtualNegativeQuotientView(
EmbossReservedVirtualNegativeQuotientView&&) = default;
EmbossReservedVirtualNegativeQuotientView& operator=(
const EmbossReservedVirtualNegativeQuotientView&) = default;
EmbossReservedVirtualNegativeQuotientView& operator=(
EmbossReservedVirtualNegativeQuotientView&&) = default;
~EmbossReservedVirtualNegativeQuotientView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedVirtualNegativeQuotientView
negative_quotient() {
return EmbossReservedVirtualNegativeQuotientView();
}
static constexpr ::emboss::support::Maybe<bool> has_negative_quotient() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedVirtualExactModulusView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedVirtualExactModulusView() {}
EmbossReservedVirtualExactModulusView(
const EmbossReservedVirtualExactModulusView&) = default;
EmbossReservedVirtualExactModulusView(
EmbossReservedVirtualExactModulusView&&) = default;
EmbossReservedVirtualExactModulusView& operator=(
const EmbossReservedVirtualExactModulusView&) = default;
EmbossReservedVirtualExactModulusView& operator=(
EmbossReservedVirtualExactModulusView&&) = default;
~EmbossReservedVirtualExactModulusView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedVirtualExactModulusView exact_modulus() {
return EmbossReservedVirtualExactModulusView();
}
static constexpr ::emboss::support::Maybe<bool> has_exact_modulus() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedVirtualTruncatingModulusView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedVirtualTruncatingModulusView() {}
EmbossReservedVirtualTruncatingModulusView(
const EmbossReservedVirtualTruncatingModulusView&) = default;
EmbossReservedVirtualTruncatingModulusView(
EmbossReservedVirtualTruncatingModulusView&&) = default;
EmbossReservedVirtualTruncatingModulusView& operator=(
const EmbossReservedVirtualTruncatingModulusView&) = default;
EmbossReservedVirtualTruncatingModulusView& operator=(
EmbossReservedVirtualTruncatingModulusView&&) = default;
~EmbossReservedVirtualTruncatingModulusView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedVirtualTruncatingModulusView
truncating_modulus() {
return EmbossReservedVirtualTruncatingModulusView();
}
static constexpr ::emboss::support::Maybe<bool> has_truncating_modulus() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedVirtualNegativeModulusView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedVirtualNegativeModulusView() {}
EmbossReservedVirtualNegativeModulusView(
const EmbossReservedVirtualNegativeModulusView&) = default;
EmbossReservedVirtualNegativeModulusView(
EmbossReservedVirtualNegativeModulusView&&) = default;
EmbossReservedVirtualNegativeModulusView& operator=(
const EmbossReservedVirtualNegativeModulusView&) = default;
EmbossReservedVirtualNegativeModulusView& operator=(
EmbossReservedVirtualNegativeModulusView&&) = default;
~EmbossReservedVirtualNegativeModulusView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedVirtualNegativeModulusView negative_modulus() {
return EmbossReservedVirtualNegativeModulusView();
}
static constexpr ::emboss::support::Maybe<bool> has_negative_modulus() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedVirtualChainedDivView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedVirtualChainedDivView() {}
EmbossReservedVirtualChainedDivView(
const EmbossReservedVirtualChainedDivView&) = default;
EmbossReservedVirtualChainedDivView(EmbossReservedVirtualChainedDivView&&) =
default;
EmbossReservedVirtualChainedDivView& operator=(
const EmbossReservedVirtualChainedDivView&) = default;
EmbossReservedVirtualChainedDivView& operator=(
EmbossReservedVirtualChainedDivView&&) = default;
~EmbossReservedVirtualChainedDivView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedVirtualChainedDivView chained_div() {
return EmbossReservedVirtualChainedDivView();
}
static constexpr ::emboss::support::Maybe<bool> has_chained_div() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedVirtualChainedModView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedVirtualChainedModView() {}
EmbossReservedVirtualChainedModView(
const EmbossReservedVirtualChainedModView&) = default;
EmbossReservedVirtualChainedModView(EmbossReservedVirtualChainedModView&&) =
default;
EmbossReservedVirtualChainedModView& operator=(
const EmbossReservedVirtualChainedModView&) = default;
EmbossReservedVirtualChainedModView& operator=(
EmbossReservedVirtualChainedModView&&) = default;
~EmbossReservedVirtualChainedModView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedVirtualChainedModView chained_mod() {
return EmbossReservedVirtualChainedModView();
}
static constexpr ::emboss::support::Maybe<bool> has_chained_mod() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedVirtualMixedDivmodView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedVirtualMixedDivmodView() {}
EmbossReservedVirtualMixedDivmodView(
const EmbossReservedVirtualMixedDivmodView&) = default;
EmbossReservedVirtualMixedDivmodView(
EmbossReservedVirtualMixedDivmodView&&) = default;
EmbossReservedVirtualMixedDivmodView& operator=(
const EmbossReservedVirtualMixedDivmodView&) = default;
EmbossReservedVirtualMixedDivmodView& operator=(
EmbossReservedVirtualMixedDivmodView&&) = default;
~EmbossReservedVirtualMixedDivmodView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedVirtualMixedDivmodView mixed_divmod() {
return EmbossReservedVirtualMixedDivmodView();
}
static constexpr ::emboss::support::Maybe<bool> has_mixed_divmod() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView() {}
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=(
const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=(
EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView
IntrinsicSizeInBytes() {
return EmbossReservedDollarVirtualIntrinsicSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedDollarVirtualMaxSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {}
EmbossReservedDollarVirtualMaxSizeInBytesView(
const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView(
EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView& operator=(
const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView& operator=(
EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualMaxSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView
MaxSizeInBytes() {
return EmbossReservedDollarVirtualMaxSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedDollarVirtualMinSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {}
EmbossReservedDollarVirtualMinSizeInBytesView(
const EmbossReservedDollarVirtualMinSizeInBytesView&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView(
EmbossReservedDollarVirtualMinSizeInBytesView&&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView& operator=(
const EmbossReservedDollarVirtualMinSizeInBytesView&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView& operator=(
EmbossReservedDollarVirtualMinSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualMinSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualMinSizeInBytesView
MinSizeInBytes() {
return EmbossReservedDollarVirtualMinSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
private:
Storage backing_;
template <class OtherStorage>
friend class GenericConstantsView;
};
using ConstantsView =
GenericConstantsView</**/ ::emboss::support::ReadOnlyContiguousBuffer>;
using ConstantsWriter =
GenericConstantsView</**/ ::emboss::support::ReadWriteContiguousBuffer>;
template <class View>
struct EmbossReservedInternalIsGenericConstantsView {
static constexpr const bool value = false;
};
template <class Storage>
struct EmbossReservedInternalIsGenericConstantsView<
GenericConstantsView<Storage>> {
static constexpr const bool value = true;
};
template <typename T>
inline GenericConstantsView<
/**/ ::emboss::support::ContiguousBuffer<
typename ::std::remove_reference<
decltype(*::std::declval<T>()->data())>::type,
1, 0>>
MakeConstantsView(T&& emboss_reserved_local_arg) {
return GenericConstantsView<
/**/ ::emboss::support::ContiguousBuffer<
typename ::std::remove_reference<
decltype(*::std::declval<T>()->data())>::type,
1, 0>>(::std::forward<T>(emboss_reserved_local_arg));
}
template <typename T>
inline GenericConstantsView</**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>
MakeConstantsView(T* emboss_reserved_local_data,
::std::size_t emboss_reserved_local_size) {
return GenericConstantsView<
/**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>(
emboss_reserved_local_data, emboss_reserved_local_size);
}
template <typename T, ::std::size_t kAlignment>
inline GenericConstantsView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>
MakeAlignedConstantsView(T* emboss_reserved_local_data,
::std::size_t emboss_reserved_local_size) {
return GenericConstantsView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>(
emboss_reserved_local_data, emboss_reserved_local_size);
}
namespace SignedRuntimeDivision {} // namespace SignedRuntimeDivision
template <class View>
struct EmbossReservedInternalIsGenericSignedRuntimeDivisionView;
template <class Storage>
class GenericSignedRuntimeDivisionView final {
public:
GenericSignedRuntimeDivisionView() : backing_() {}
explicit GenericSignedRuntimeDivisionView(Storage emboss_reserved_local_bytes)
: backing_(emboss_reserved_local_bytes) {}
template <typename OtherStorage>
GenericSignedRuntimeDivisionView(
const GenericSignedRuntimeDivisionView<OtherStorage>&
emboss_reserved_local_other)
: backing_{emboss_reserved_local_other.BackingStorage()} {}
template <typename Arg,
typename = typename ::std::enable_if<
!EmbossReservedInternalIsGenericSignedRuntimeDivisionView<
typename ::std::remove_cv<typename ::std::remove_reference<
Arg>::type>::type>::value>::type>
explicit GenericSignedRuntimeDivisionView(Arg&& emboss_reserved_local_arg)
: backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {}
template <typename Arg0, typename Arg1, typename... Args>
explicit GenericSignedRuntimeDivisionView(
Arg0&& emboss_reserved_local_arg0, Arg1&& emboss_reserved_local_arg1,
Args&&... emboss_reserved_local_args)
: backing_(::std::forward<Arg0>(emboss_reserved_local_arg0),
::std::forward<Arg1>(emboss_reserved_local_arg1),
::std::forward<Args>(emboss_reserved_local_args)...) {}
template <typename OtherStorage>
GenericSignedRuntimeDivisionView<Storage>& operator=(
const GenericSignedRuntimeDivisionView<OtherStorage>&
emboss_reserved_local_other) {
backing_ = emboss_reserved_local_other.BackingStorage();
return *this;
}
bool Ok() const {
if (!IsComplete()) return false;
if (!has_wide_dividend().Known()) return false;
if (has_wide_dividend().ValueOrDefault() && !wide_dividend().Ok())
return false;
if (!has_narrow_dividend().Known()) return false;
if (has_narrow_dividend().ValueOrDefault() && !narrow_dividend().Ok())
return false;
if (!has_divisor_magnitude().Known()) return false;
if (has_divisor_magnitude().ValueOrDefault() && !divisor_magnitude().Ok())
return false;
if (!has_wide_quotient_by_constant().Known()) return false;
if (has_wide_quotient_by_constant().ValueOrDefault() &&
!wide_quotient_by_constant().Ok())
return false;
if (!has_wide_remainder_by_constant().Known()) return false;
if (has_wide_remainder_by_constant().ValueOrDefault() &&
!wide_remainder_by_constant().Ok())
return false;
if (!has_wide_quotient_by_divisor().Known()) return false;
if (has_wide_quotient_by_divisor().ValueOrDefault() &&
!wide_quotient_by_divisor().Ok())
return false;
if (!has_wide_remainder_by_negative_divisor().Known()) return false;
if (has_wide_remainder_by_negative_divisor().ValueOrDefault() &&
!wide_remainder_by_negative_divisor().Ok())
return false;
if (!has_narrow_quotient_by_negative_divisor().Known()) return false;
if (has_narrow_quotient_by_negative_divisor().ValueOrDefault() &&
!narrow_quotient_by_negative_divisor().Ok())
return false;
if (!has_narrow_remainder_by_negative_divisor().Known()) return false;
if (has_narrow_remainder_by_negative_divisor().ValueOrDefault() &&
!narrow_remainder_by_negative_divisor().Ok())
return false;
if (!has_IntrinsicSizeInBytes().Known()) return false;
if (has_IntrinsicSizeInBytes().ValueOrDefault() &&
!IntrinsicSizeInBytes().Ok())
return false;
if (!has_MaxSizeInBytes().Known()) return false;
if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok())
return false;
if (!has_MinSizeInBytes().Known()) return false;
if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok())
return false;
return true;
}
Storage BackingStorage() const { return backing_; }
bool IsComplete() const {
return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) ||
(backing_.Ok() && IntrinsicSizeInBytes().Ok() &&
backing_.SizeInBytes() >=
static_cast</**/ ::std::size_t>(
IntrinsicSizeInBytes().UncheckedRead()));
}
static constexpr ::std::size_t SizeInBytes() {
return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read());
}
static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); }
template <typename OtherStorage>
bool Equals(GenericSignedRuntimeDivisionView<OtherStorage>
emboss_reserved_local_other) const {
if (!has_wide_dividend().Known()) return false;
if (!emboss_reserved_local_other.has_wide_dividend().Known()) return false;
if (emboss_reserved_local_other.has_wide_dividend().ValueOrDefault() &&
!has_wide_dividend().ValueOrDefault())
return false;
if (has_wide_dividend().ValueOrDefault() &&
!emboss_reserved_local_other.has_wide_dividend().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_wide_dividend().ValueOrDefault() &&
has_wide_dividend().ValueOrDefault() &&
!wide_dividend().Equals(emboss_reserved_local_other.wide_dividend()))
return false;
if (!has_narrow_dividend().Known()) return false;
if (!emboss_reserved_local_other.has_narrow_dividend().Known())
return false;
if (emboss_reserved_local_other.has_narrow_dividend().ValueOrDefault() &&
!has_narrow_dividend().ValueOrDefault())
return false;
if (has_narrow_dividend().ValueOrDefault() &&
!emboss_reserved_local_other.has_narrow_dividend().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_narrow_dividend().ValueOrDefault() &&
has_narrow_dividend().ValueOrDefault() &&
!narrow_dividend().Equals(
emboss_reserved_local_other.narrow_dividend()))
return false;
if (!has_divisor_magnitude().Known()) return false;
if (!emboss_reserved_local_other.has_divisor_magnitude().Known())
return false;
if (emboss_reserved_local_other.has_divisor_magnitude().ValueOrDefault() &&
!has_divisor_magnitude().ValueOrDefault())
return false;
if (has_divisor_magnitude().ValueOrDefault() &&
!emboss_reserved_local_other.has_divisor_magnitude().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_divisor_magnitude().ValueOrDefault() &&
has_divisor_magnitude().ValueOrDefault() &&
!divisor_magnitude().Equals(
emboss_reserved_local_other.divisor_magnitude()))
return false;
return true;
}
template <typename OtherStorage>
bool UncheckedEquals(GenericSignedRuntimeDivisionView<OtherStorage>
emboss_reserved_local_other) const {
if (emboss_reserved_local_other.has_wide_dividend().ValueOr(false) &&
!has_wide_dividend().ValueOr(false))
return false;
if (has_wide_dividend().ValueOr(false) &&
!emboss_reserved_local_other.has_wide_dividend().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_wide_dividend().ValueOr(false) &&
has_wide_dividend().ValueOr(false) &&
!wide_dividend().UncheckedEquals(
emboss_reserved_local_other.wide_dividend()))
return false;
if (emboss_reserved_local_other.has_narrow_dividend().ValueOr(false) &&
!has_narrow_dividend().ValueOr(false))
return false;
if (has_narrow_dividend().ValueOr(false) &&
!emboss_reserved_local_other.has_narrow_dividend().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_narrow_dividend().ValueOr(false) &&
has_narrow_dividend().ValueOr(false) &&
!narrow_dividend().UncheckedEquals(
emboss_reserved_local_other.narrow_dividend()))
return false;
if (emboss_reserved_local_other.has_divisor_magnitude().ValueOr(false) &&
!has_divisor_magnitude().ValueOr(false))
return false;
if (has_divisor_magnitude().ValueOr(false) &&
!emboss_reserved_local_other.has_divisor_magnitude().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_divisor_magnitude().ValueOr(false) &&
has_divisor_magnitude().ValueOr(false) &&
!divisor_magnitude().UncheckedEquals(
emboss_reserved_local_other.divisor_magnitude()))
return false;
return true;
}
template <typename OtherStorage>
void UncheckedCopyFrom(GenericSignedRuntimeDivisionView<OtherStorage>
emboss_reserved_local_other) const {
backing_.UncheckedCopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead());
}
template <typename OtherStorage>
void CopyFrom(GenericSignedRuntimeDivisionView<OtherStorage>
emboss_reserved_local_other) const {
backing_.CopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().Read());
}
template <typename OtherStorage>
bool TryToCopyFrom(GenericSignedRuntimeDivisionView<OtherStorage>
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 <class Stream>
bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const {
::std::string emboss_reserved_local_brace;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_brace))
return false;
if (emboss_reserved_local_brace != "{") return false;
for (;;) {
::std::string emboss_reserved_local_name;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_name))
return false;
if (emboss_reserved_local_name == ",")
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_name))
return false;
if (emboss_reserved_local_name == "}") return true;
::std::string emboss_reserved_local_colon;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_colon))
return false;
if (emboss_reserved_local_colon != ":") return false;
if (emboss_reserved_local_name == "wide_dividend") {
if (!wide_dividend().UpdateFromTextStream(
emboss_reserved_local_stream)) {
return false;
}
continue;
}
if (emboss_reserved_local_name == "narrow_dividend") {
if (!narrow_dividend().UpdateFromTextStream(
emboss_reserved_local_stream)) {
return false;
}
continue;
}
if (emboss_reserved_local_name == "divisor_magnitude") {
if (!divisor_magnitude().UpdateFromTextStream(
emboss_reserved_local_stream)) {
return false;
}
continue;
}
return false;
}
}
template <class Stream>
void WriteToTextStream(
Stream* emboss_reserved_local_stream,
::emboss::TextOutputOptions emboss_reserved_local_options) const {
::emboss::TextOutputOptions emboss_reserved_local_field_options =
emboss_reserved_local_options.PlusOneIndent();
if (emboss_reserved_local_options.multiline()) {
emboss_reserved_local_stream->Write("{\n");
} else {
emboss_reserved_local_stream->Write("{");
}
bool emboss_reserved_local_wrote_field = false;
if (has_wide_dividend().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
wide_dividend().IsAggregate() || wide_dividend().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
} else {
if (emboss_reserved_local_wrote_field) {
emboss_reserved_local_stream->Write(",");
}
emboss_reserved_local_stream->Write(" ");
}
emboss_reserved_local_stream->Write("wide_dividend: ");
wide_dividend().WriteToTextStream(emboss_reserved_local_stream,
emboss_reserved_local_field_options);
emboss_reserved_local_wrote_field = true;
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write("\n");
}
} else if (emboss_reserved_local_field_options.allow_partial_output() &&
emboss_reserved_local_field_options.comments() &&
!wide_dividend().IsAggregate() && !wide_dividend().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
}
emboss_reserved_local_stream->Write("# wide_dividend: UNREADABLE\n");
}
}
if (has_narrow_dividend().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
narrow_dividend().IsAggregate() || narrow_dividend().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
} else {
if (emboss_reserved_local_wrote_field) {
emboss_reserved_local_stream->Write(",");
}
emboss_reserved_local_stream->Write(" ");
}
emboss_reserved_local_stream->Write("narrow_dividend: ");
narrow_dividend().WriteToTextStream(
emboss_reserved_local_stream, emboss_reserved_local_field_options);
emboss_reserved_local_wrote_field = true;
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write("\n");
}
} else if (emboss_reserved_local_field_options.allow_partial_output() &&
emboss_reserved_local_field_options.comments() &&
!narrow_dividend().IsAggregate() && !narrow_dividend().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
}
emboss_reserved_local_stream->Write("# narrow_dividend: UNREADABLE\n");
}
}
if (has_divisor_magnitude().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
divisor_magnitude().IsAggregate() || divisor_magnitude().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
} else {
if (emboss_reserved_local_wrote_field) {
emboss_reserved_local_stream->Write(",");
}
emboss_reserved_local_stream->Write(" ");
}
emboss_reserved_local_stream->Write("divisor_magnitude: ");
divisor_magnitude().WriteToTextStream(
emboss_reserved_local_stream, emboss_reserved_local_field_options);
emboss_reserved_local_wrote_field = true;
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write("\n");
}
} else if (emboss_reserved_local_field_options.allow_partial_output() &&
emboss_reserved_local_field_options.comments() &&
!divisor_magnitude().IsAggregate() &&
!divisor_magnitude().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
}
emboss_reserved_local_stream->Write(
"# divisor_magnitude: UNREADABLE\n");
}
}
if (has_wide_quotient_by_constant().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
wide_quotient_by_constant().IsAggregate() ||
wide_quotient_by_constant().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write("# wide_quotient_by_constant: ");
wide_quotient_by_constant().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(
"# wide_quotient_by_constant: UNREADABLE\n");
}
}
if (has_wide_remainder_by_constant().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
wide_remainder_by_constant().IsAggregate() ||
wide_remainder_by_constant().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write("# wide_remainder_by_constant: ");
wide_remainder_by_constant().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(
"# wide_remainder_by_constant: UNREADABLE\n");
}
}
if (has_wide_quotient_by_divisor().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
wide_quotient_by_divisor().IsAggregate() ||
wide_quotient_by_divisor().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write("# wide_quotient_by_divisor: ");
wide_quotient_by_divisor().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(
"# wide_quotient_by_divisor: UNREADABLE\n");
}
}
if (has_wide_remainder_by_negative_divisor().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
wide_remainder_by_negative_divisor().IsAggregate() ||
wide_remainder_by_negative_divisor().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write(
"# wide_remainder_by_negative_divisor: ");
wide_remainder_by_negative_divisor().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(
"# wide_remainder_by_negative_divisor: UNREADABLE\n");
}
}
if (has_narrow_quotient_by_negative_divisor().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
narrow_quotient_by_negative_divisor().IsAggregate() ||
narrow_quotient_by_negative_divisor().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write(
"# narrow_quotient_by_negative_divisor: ");
narrow_quotient_by_negative_divisor().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(
"# narrow_quotient_by_negative_divisor: UNREADABLE\n");
}
}
if (has_narrow_remainder_by_negative_divisor().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
narrow_remainder_by_negative_divisor().IsAggregate() ||
narrow_remainder_by_negative_divisor().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write(
"# narrow_remainder_by_negative_divisor: ");
narrow_remainder_by_negative_divisor().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(
"# narrow_remainder_by_negative_divisor: UNREADABLE\n");
}
}
(void)emboss_reserved_local_wrote_field;
if (emboss_reserved_local_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_options.current_indent());
emboss_reserved_local_stream->Write("}");
} else {
emboss_reserved_local_stream->Write(" }");
}
}
static constexpr bool IsAggregate() { return true; }
public:
typename ::emboss::prelude::IntView<
/**/ ::emboss::support::FixedSizeViewParameters<
64, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
64>>
wide_dividend() const;
::emboss::support::Maybe<bool> has_wide_dividend() const;
public:
typename ::emboss::prelude::IntView<
/**/ ::emboss::support::FixedSizeViewParameters<
32, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 8>>,
32>>
narrow_dividend() const;
::emboss::support::Maybe<bool> has_narrow_dividend() const;
public:
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 12>>,
8>>
divisor_magnitude() const;
::emboss::support::Maybe<bool> has_divisor_magnitude() const;
public:
class EmbossReservedVirtualWideQuotientByConstantView final {
public:
using ValueType = ::std::int64_t;
explicit EmbossReservedVirtualWideQuotientByConstantView(
const GenericSignedRuntimeDivisionView& emboss_reserved_local_view)
: view_(emboss_reserved_local_view) {}
EmbossReservedVirtualWideQuotientByConstantView() = delete;
EmbossReservedVirtualWideQuotientByConstantView(
const EmbossReservedVirtualWideQuotientByConstantView&) = default;
EmbossReservedVirtualWideQuotientByConstantView(
EmbossReservedVirtualWideQuotientByConstantView&&) = default;
EmbossReservedVirtualWideQuotientByConstantView& operator=(
const EmbossReservedVirtualWideQuotientByConstantView&) = default;
EmbossReservedVirtualWideQuotientByConstantView& operator=(
EmbossReservedVirtualWideQuotientByConstantView&&) = default;
~EmbossReservedVirtualWideQuotientByConstantView() = default;
::std::int64_t Read() const {
EMBOSS_CHECK(view_.has_wide_quotient_by_constant().ValueOr(false));
auto emboss_reserved_local_value = MaybeRead();
EMBOSS_CHECK(emboss_reserved_local_value.Known());
EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault()));
return emboss_reserved_local_value.ValueOrDefault();
}
::std::int64_t UncheckedRead() const {
return MaybeRead().ValueOrDefault();
}
bool Ok() const {
auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known() &&
ValueIsOk(emboss_reserved_local_value.ValueOrDefault());
}
::emboss::support::Maybe<bool> IsUndefined() const {
const auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known()
? ::emboss::support::Maybe<bool>(false)
: (emboss_reserved_local_value.IsUndefined()
? ::emboss::support::Maybe<bool>(true)
: ::emboss::support::Maybe<bool>());
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
private:
::emboss::support::Maybe</**/ ::std::int64_t> MaybeRead() const {
const auto emboss_reserved_local_subexpr_1 = view_.wide_dividend();
const auto emboss_reserved_local_subexpr_2 =
(emboss_reserved_local_subexpr_1.Ok()
? ::emboss::support::Maybe</**/ ::std::int64_t>(
static_cast</**/ ::std::int64_t>(
emboss_reserved_local_subexpr_1.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int64_t>());
const auto emboss_reserved_local_subexpr_3 =
::emboss::support::FlooringQuotient</**/ ::std::int64_t,
::std::int64_t, ::std::int64_t,
::std::int32_t>(
emboss_reserved_local_subexpr_2,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(4LL)));
return emboss_reserved_local_subexpr_3;
}
static constexpr bool ValueIsOk(
::std::int64_t emboss_reserved_local_value) {
return (void)emboss_reserved_local_value, // Silence -Wunused-parameter
::emboss::support::Maybe<bool>(true).ValueOr(false);
}
const GenericSignedRuntimeDivisionView view_;
};
EmbossReservedVirtualWideQuotientByConstantView wide_quotient_by_constant()
const;
::emboss::support::Maybe<bool> has_wide_quotient_by_constant() const;
public:
class EmbossReservedVirtualWideRemainderByConstantView final {
public:
using ValueType = ::std::int32_t;
explicit EmbossReservedVirtualWideRemainderByConstantView(
const GenericSignedRuntimeDivisionView& emboss_reserved_local_view)
: view_(emboss_reserved_local_view) {}
EmbossReservedVirtualWideRemainderByConstantView() = delete;
EmbossReservedVirtualWideRemainderByConstantView(
const EmbossReservedVirtualWideRemainderByConstantView&) = default;
EmbossReservedVirtualWideRemainderByConstantView(
EmbossReservedVirtualWideRemainderByConstantView&&) = default;
EmbossReservedVirtualWideRemainderByConstantView& operator=(
const EmbossReservedVirtualWideRemainderByConstantView&) = default;
EmbossReservedVirtualWideRemainderByConstantView& operator=(
EmbossReservedVirtualWideRemainderByConstantView&&) = default;
~EmbossReservedVirtualWideRemainderByConstantView() = default;
::std::int32_t Read() const {
EMBOSS_CHECK(view_.has_wide_remainder_by_constant().ValueOr(false));
auto emboss_reserved_local_value = MaybeRead();
EMBOSS_CHECK(emboss_reserved_local_value.Known());
EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault()));
return emboss_reserved_local_value.ValueOrDefault();
}
::std::int32_t UncheckedRead() const {
return MaybeRead().ValueOrDefault();
}
bool Ok() const {
auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known() &&
ValueIsOk(emboss_reserved_local_value.ValueOrDefault());
}
::emboss::support::Maybe<bool> IsUndefined() const {
const auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known()
? ::emboss::support::Maybe<bool>(false)
: (emboss_reserved_local_value.IsUndefined()
? ::emboss::support::Maybe<bool>(true)
: ::emboss::support::Maybe<bool>());
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
private:
::emboss::support::Maybe</**/ ::std::int32_t> MaybeRead() const {
const auto emboss_reserved_local_subexpr_1 = view_.wide_dividend();
const auto emboss_reserved_local_subexpr_2 =
(emboss_reserved_local_subexpr_1.Ok()
? ::emboss::support::Maybe</**/ ::std::int64_t>(
static_cast</**/ ::std::int64_t>(
emboss_reserved_local_subexpr_1.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int64_t>());
const auto emboss_reserved_local_subexpr_3 =
::emboss::support::FlooringRemainder</**/ ::std::int64_t,
::std::int32_t, ::std::int64_t,
::std::int32_t>(
emboss_reserved_local_subexpr_2,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(4LL)));
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<bool>(true).ValueOr(false);
}
const GenericSignedRuntimeDivisionView view_;
};
EmbossReservedVirtualWideRemainderByConstantView wide_remainder_by_constant()
const;
::emboss::support::Maybe<bool> has_wide_remainder_by_constant() const;
public:
class EmbossReservedVirtualWideQuotientByDivisorView final {
public:
using ValueType = ::std::int64_t;
explicit EmbossReservedVirtualWideQuotientByDivisorView(
const GenericSignedRuntimeDivisionView& emboss_reserved_local_view)
: view_(emboss_reserved_local_view) {}
EmbossReservedVirtualWideQuotientByDivisorView() = delete;
EmbossReservedVirtualWideQuotientByDivisorView(
const EmbossReservedVirtualWideQuotientByDivisorView&) = default;
EmbossReservedVirtualWideQuotientByDivisorView(
EmbossReservedVirtualWideQuotientByDivisorView&&) = default;
EmbossReservedVirtualWideQuotientByDivisorView& operator=(
const EmbossReservedVirtualWideQuotientByDivisorView&) = default;
EmbossReservedVirtualWideQuotientByDivisorView& operator=(
EmbossReservedVirtualWideQuotientByDivisorView&&) = default;
~EmbossReservedVirtualWideQuotientByDivisorView() = default;
::std::int64_t Read() const {
EMBOSS_CHECK(view_.has_wide_quotient_by_divisor().ValueOr(false));
auto emboss_reserved_local_value = MaybeRead();
EMBOSS_CHECK(emboss_reserved_local_value.Known());
EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault()));
return emboss_reserved_local_value.ValueOrDefault();
}
::std::int64_t UncheckedRead() const {
return MaybeRead().ValueOrDefault();
}
bool Ok() const {
auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known() &&
ValueIsOk(emboss_reserved_local_value.ValueOrDefault());
}
::emboss::support::Maybe<bool> IsUndefined() const {
const auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known()
? ::emboss::support::Maybe<bool>(false)
: (emboss_reserved_local_value.IsUndefined()
? ::emboss::support::Maybe<bool>(true)
: ::emboss::support::Maybe<bool>());
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
private:
::emboss::support::Maybe</**/ ::std::int64_t> MaybeRead() const {
const auto emboss_reserved_local_subexpr_1 = view_.wide_dividend();
const auto emboss_reserved_local_subexpr_2 =
(emboss_reserved_local_subexpr_1.Ok()
? ::emboss::support::Maybe</**/ ::std::int64_t>(
static_cast</**/ ::std::int64_t>(
emboss_reserved_local_subexpr_1.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int64_t>());
const auto emboss_reserved_local_subexpr_3 = view_.divisor_magnitude();
const auto emboss_reserved_local_subexpr_4 =
(emboss_reserved_local_subexpr_3.Ok()
? ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(
emboss_reserved_local_subexpr_3.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int32_t>());
const auto emboss_reserved_local_subexpr_5 =
::emboss::support::Maximum</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
emboss_reserved_local_subexpr_4,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL)));
const auto emboss_reserved_local_subexpr_6 =
::emboss::support::FlooringQuotient</**/ ::std::int64_t,
::std::int64_t, ::std::int64_t,
::std::int32_t>(
emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_5);
return emboss_reserved_local_subexpr_6;
}
static constexpr bool ValueIsOk(
::std::int64_t emboss_reserved_local_value) {
return (void)emboss_reserved_local_value, // Silence -Wunused-parameter
::emboss::support::Maybe<bool>(true).ValueOr(false);
}
const GenericSignedRuntimeDivisionView view_;
};
EmbossReservedVirtualWideQuotientByDivisorView wide_quotient_by_divisor()
const;
::emboss::support::Maybe<bool> has_wide_quotient_by_divisor() const;
public:
class EmbossReservedVirtualWideRemainderByNegativeDivisorView final {
public:
using ValueType = ::std::int32_t;
explicit EmbossReservedVirtualWideRemainderByNegativeDivisorView(
const GenericSignedRuntimeDivisionView& emboss_reserved_local_view)
: view_(emboss_reserved_local_view) {}
EmbossReservedVirtualWideRemainderByNegativeDivisorView() = delete;
EmbossReservedVirtualWideRemainderByNegativeDivisorView(
const EmbossReservedVirtualWideRemainderByNegativeDivisorView&) =
default;
EmbossReservedVirtualWideRemainderByNegativeDivisorView(
EmbossReservedVirtualWideRemainderByNegativeDivisorView&&) = default;
EmbossReservedVirtualWideRemainderByNegativeDivisorView& operator=(
const EmbossReservedVirtualWideRemainderByNegativeDivisorView&) =
default;
EmbossReservedVirtualWideRemainderByNegativeDivisorView& operator=(
EmbossReservedVirtualWideRemainderByNegativeDivisorView&&) = default;
~EmbossReservedVirtualWideRemainderByNegativeDivisorView() = default;
::std::int32_t Read() const {
EMBOSS_CHECK(
view_.has_wide_remainder_by_negative_divisor().ValueOr(false));
auto emboss_reserved_local_value = MaybeRead();
EMBOSS_CHECK(emboss_reserved_local_value.Known());
EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault()));
return emboss_reserved_local_value.ValueOrDefault();
}
::std::int32_t UncheckedRead() const {
return MaybeRead().ValueOrDefault();
}
bool Ok() const {
auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known() &&
ValueIsOk(emboss_reserved_local_value.ValueOrDefault());
}
::emboss::support::Maybe<bool> IsUndefined() const {
const auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known()
? ::emboss::support::Maybe<bool>(false)
: (emboss_reserved_local_value.IsUndefined()
? ::emboss::support::Maybe<bool>(true)
: ::emboss::support::Maybe<bool>());
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
private:
::emboss::support::Maybe</**/ ::std::int32_t> MaybeRead() const {
const auto emboss_reserved_local_subexpr_1 = view_.wide_dividend();
const auto emboss_reserved_local_subexpr_2 =
(emboss_reserved_local_subexpr_1.Ok()
? ::emboss::support::Maybe</**/ ::std::int64_t>(
static_cast</**/ ::std::int64_t>(
emboss_reserved_local_subexpr_1.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int64_t>());
const auto emboss_reserved_local_subexpr_3 = view_.divisor_magnitude();
const auto emboss_reserved_local_subexpr_4 =
(emboss_reserved_local_subexpr_3.Ok()
? ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(
emboss_reserved_local_subexpr_3.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int32_t>());
const auto emboss_reserved_local_subexpr_5 =
::emboss::support::Maximum</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
emboss_reserved_local_subexpr_4,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL)));
const auto emboss_reserved_local_subexpr_6 =
::emboss::support::Difference</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL)),
emboss_reserved_local_subexpr_5);
const auto emboss_reserved_local_subexpr_7 =
::emboss::support::FlooringRemainder</**/ ::std::int64_t,
::std::int32_t, ::std::int64_t,
::std::int32_t>(
emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_6);
return emboss_reserved_local_subexpr_7;
}
static constexpr bool ValueIsOk(
::std::int32_t emboss_reserved_local_value) {
return (void)emboss_reserved_local_value, // Silence -Wunused-parameter
::emboss::support::Maybe<bool>(true).ValueOr(false);
}
const GenericSignedRuntimeDivisionView view_;
};
EmbossReservedVirtualWideRemainderByNegativeDivisorView
wide_remainder_by_negative_divisor() const;
::emboss::support::Maybe<bool> has_wide_remainder_by_negative_divisor() const;
public:
class EmbossReservedVirtualNarrowQuotientByNegativeDivisorView final {
public:
using ValueType = ::std::int64_t;
explicit EmbossReservedVirtualNarrowQuotientByNegativeDivisorView(
const GenericSignedRuntimeDivisionView& emboss_reserved_local_view)
: view_(emboss_reserved_local_view) {}
EmbossReservedVirtualNarrowQuotientByNegativeDivisorView() = delete;
EmbossReservedVirtualNarrowQuotientByNegativeDivisorView(
const EmbossReservedVirtualNarrowQuotientByNegativeDivisorView&) =
default;
EmbossReservedVirtualNarrowQuotientByNegativeDivisorView(
EmbossReservedVirtualNarrowQuotientByNegativeDivisorView&&) = default;
EmbossReservedVirtualNarrowQuotientByNegativeDivisorView& operator=(
const EmbossReservedVirtualNarrowQuotientByNegativeDivisorView&) =
default;
EmbossReservedVirtualNarrowQuotientByNegativeDivisorView& operator=(
EmbossReservedVirtualNarrowQuotientByNegativeDivisorView&&) = default;
~EmbossReservedVirtualNarrowQuotientByNegativeDivisorView() = default;
::std::int64_t Read() const {
EMBOSS_CHECK(
view_.has_narrow_quotient_by_negative_divisor().ValueOr(false));
auto emboss_reserved_local_value = MaybeRead();
EMBOSS_CHECK(emboss_reserved_local_value.Known());
EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault()));
return emboss_reserved_local_value.ValueOrDefault();
}
::std::int64_t UncheckedRead() const {
return MaybeRead().ValueOrDefault();
}
bool Ok() const {
auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known() &&
ValueIsOk(emboss_reserved_local_value.ValueOrDefault());
}
::emboss::support::Maybe<bool> IsUndefined() const {
const auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known()
? ::emboss::support::Maybe<bool>(false)
: (emboss_reserved_local_value.IsUndefined()
? ::emboss::support::Maybe<bool>(true)
: ::emboss::support::Maybe<bool>());
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
private:
::emboss::support::Maybe</**/ ::std::int64_t> MaybeRead() const {
const auto emboss_reserved_local_subexpr_1 = view_.narrow_dividend();
const auto emboss_reserved_local_subexpr_2 =
(emboss_reserved_local_subexpr_1.Ok()
? ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(
emboss_reserved_local_subexpr_1.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int32_t>());
const auto emboss_reserved_local_subexpr_3 = view_.divisor_magnitude();
const auto emboss_reserved_local_subexpr_4 =
(emboss_reserved_local_subexpr_3.Ok()
? ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(
emboss_reserved_local_subexpr_3.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int32_t>());
const auto emboss_reserved_local_subexpr_5 =
::emboss::support::Maximum</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
emboss_reserved_local_subexpr_4,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL)));
const auto emboss_reserved_local_subexpr_6 =
::emboss::support::Difference</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL)),
emboss_reserved_local_subexpr_5);
const auto emboss_reserved_local_subexpr_7 =
::emboss::support::FlooringQuotient</**/ ::std::int64_t,
::std::int64_t, ::std::int32_t,
::std::int32_t>(
emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_6);
return emboss_reserved_local_subexpr_7;
}
static constexpr bool ValueIsOk(
::std::int64_t emboss_reserved_local_value) {
return (void)emboss_reserved_local_value, // Silence -Wunused-parameter
::emboss::support::Maybe<bool>(true).ValueOr(false);
}
const GenericSignedRuntimeDivisionView view_;
};
EmbossReservedVirtualNarrowQuotientByNegativeDivisorView
narrow_quotient_by_negative_divisor() const;
::emboss::support::Maybe<bool> has_narrow_quotient_by_negative_divisor()
const;
public:
class EmbossReservedVirtualNarrowRemainderByNegativeDivisorView final {
public:
using ValueType = ::std::int32_t;
explicit EmbossReservedVirtualNarrowRemainderByNegativeDivisorView(
const GenericSignedRuntimeDivisionView& emboss_reserved_local_view)
: view_(emboss_reserved_local_view) {}
EmbossReservedVirtualNarrowRemainderByNegativeDivisorView() = delete;
EmbossReservedVirtualNarrowRemainderByNegativeDivisorView(
const EmbossReservedVirtualNarrowRemainderByNegativeDivisorView&) =
default;
EmbossReservedVirtualNarrowRemainderByNegativeDivisorView(
EmbossReservedVirtualNarrowRemainderByNegativeDivisorView&&) = default;
EmbossReservedVirtualNarrowRemainderByNegativeDivisorView& operator=(
const EmbossReservedVirtualNarrowRemainderByNegativeDivisorView&) =
default;
EmbossReservedVirtualNarrowRemainderByNegativeDivisorView& operator=(
EmbossReservedVirtualNarrowRemainderByNegativeDivisorView&&) = default;
~EmbossReservedVirtualNarrowRemainderByNegativeDivisorView() = default;
::std::int32_t Read() const {
EMBOSS_CHECK(
view_.has_narrow_remainder_by_negative_divisor().ValueOr(false));
auto emboss_reserved_local_value = MaybeRead();
EMBOSS_CHECK(emboss_reserved_local_value.Known());
EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault()));
return emboss_reserved_local_value.ValueOrDefault();
}
::std::int32_t UncheckedRead() const {
return MaybeRead().ValueOrDefault();
}
bool Ok() const {
auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known() &&
ValueIsOk(emboss_reserved_local_value.ValueOrDefault());
}
::emboss::support::Maybe<bool> IsUndefined() const {
const auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known()
? ::emboss::support::Maybe<bool>(false)
: (emboss_reserved_local_value.IsUndefined()
? ::emboss::support::Maybe<bool>(true)
: ::emboss::support::Maybe<bool>());
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
private:
::emboss::support::Maybe</**/ ::std::int32_t> MaybeRead() const {
const auto emboss_reserved_local_subexpr_1 = view_.narrow_dividend();
const auto emboss_reserved_local_subexpr_2 =
(emboss_reserved_local_subexpr_1.Ok()
? ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(
emboss_reserved_local_subexpr_1.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int32_t>());
const auto emboss_reserved_local_subexpr_3 = view_.divisor_magnitude();
const auto emboss_reserved_local_subexpr_4 =
(emboss_reserved_local_subexpr_3.Ok()
? ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(
emboss_reserved_local_subexpr_3.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int32_t>());
const auto emboss_reserved_local_subexpr_5 =
::emboss::support::Maximum</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
emboss_reserved_local_subexpr_4,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL)));
const auto emboss_reserved_local_subexpr_6 =
::emboss::support::Difference</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL)),
emboss_reserved_local_subexpr_5);
const auto emboss_reserved_local_subexpr_7 =
::emboss::support::FlooringRemainder</**/ ::std::int32_t,
::std::int32_t, ::std::int32_t,
::std::int32_t>(
emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_6);
return emboss_reserved_local_subexpr_7;
}
static constexpr bool ValueIsOk(
::std::int32_t emboss_reserved_local_value) {
return (void)emboss_reserved_local_value, // Silence -Wunused-parameter
::emboss::support::Maybe<bool>(true).ValueOr(false);
}
const GenericSignedRuntimeDivisionView view_;
};
EmbossReservedVirtualNarrowRemainderByNegativeDivisorView
narrow_remainder_by_negative_divisor() const;
::emboss::support::Maybe<bool> has_narrow_remainder_by_negative_divisor()
const;
public:
class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView() {}
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=(
const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=(
EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView
IntrinsicSizeInBytes() {
return EmbossReservedDollarVirtualIntrinsicSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedDollarVirtualMaxSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {}
EmbossReservedDollarVirtualMaxSizeInBytesView(
const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView(
EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView& operator=(
const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView& operator=(
EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualMaxSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView
MaxSizeInBytes() {
return EmbossReservedDollarVirtualMaxSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedDollarVirtualMinSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {}
EmbossReservedDollarVirtualMinSizeInBytesView(
const EmbossReservedDollarVirtualMinSizeInBytesView&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView(
EmbossReservedDollarVirtualMinSizeInBytesView&&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView& operator=(
const EmbossReservedDollarVirtualMinSizeInBytesView&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView& operator=(
EmbossReservedDollarVirtualMinSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualMinSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualMinSizeInBytesView
MinSizeInBytes() {
return EmbossReservedDollarVirtualMinSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
private:
Storage backing_;
template <class OtherStorage>
friend class GenericSignedRuntimeDivisionView;
};
using SignedRuntimeDivisionView = GenericSignedRuntimeDivisionView<
/**/ ::emboss::support::ReadOnlyContiguousBuffer>;
using SignedRuntimeDivisionWriter = GenericSignedRuntimeDivisionView<
/**/ ::emboss::support::ReadWriteContiguousBuffer>;
template <class View>
struct EmbossReservedInternalIsGenericSignedRuntimeDivisionView {
static constexpr const bool value = false;
};
template <class Storage>
struct EmbossReservedInternalIsGenericSignedRuntimeDivisionView<
GenericSignedRuntimeDivisionView<Storage>> {
static constexpr const bool value = true;
};
template <typename T>
inline GenericSignedRuntimeDivisionView<
/**/ ::emboss::support::ContiguousBuffer<
typename ::std::remove_reference<
decltype(*::std::declval<T>()->data())>::type,
1, 0>>
MakeSignedRuntimeDivisionView(T&& emboss_reserved_local_arg) {
return GenericSignedRuntimeDivisionView<
/**/ ::emboss::support::ContiguousBuffer<
typename ::std::remove_reference<
decltype(*::std::declval<T>()->data())>::type,
1, 0>>(::std::forward<T>(emboss_reserved_local_arg));
}
template <typename T>
inline GenericSignedRuntimeDivisionView<
/**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>
MakeSignedRuntimeDivisionView(T* emboss_reserved_local_data,
::std::size_t emboss_reserved_local_size) {
return GenericSignedRuntimeDivisionView<
/**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>(
emboss_reserved_local_data, emboss_reserved_local_size);
}
template <typename T, ::std::size_t kAlignment>
inline GenericSignedRuntimeDivisionView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>
MakeAlignedSignedRuntimeDivisionView(T* emboss_reserved_local_data,
::std::size_t emboss_reserved_local_size) {
return GenericSignedRuntimeDivisionView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>(
emboss_reserved_local_data, emboss_reserved_local_size);
}
namespace PayloadSizedByDivision {} // namespace PayloadSizedByDivision
template <class View>
struct EmbossReservedInternalIsGenericPayloadSizedByDivisionView;
template <class Storage>
class GenericPayloadSizedByDivisionView final {
public:
GenericPayloadSizedByDivisionView() : backing_() {}
explicit GenericPayloadSizedByDivisionView(
Storage emboss_reserved_local_bytes)
: backing_(emboss_reserved_local_bytes) {}
template <typename OtherStorage>
GenericPayloadSizedByDivisionView(
const GenericPayloadSizedByDivisionView<OtherStorage>&
emboss_reserved_local_other)
: backing_{emboss_reserved_local_other.BackingStorage()} {}
template <typename Arg,
typename = typename ::std::enable_if<
!EmbossReservedInternalIsGenericPayloadSizedByDivisionView<
typename ::std::remove_cv<typename ::std::remove_reference<
Arg>::type>::type>::value>::type>
explicit GenericPayloadSizedByDivisionView(Arg&& emboss_reserved_local_arg)
: backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {}
template <typename Arg0, typename Arg1, typename... Args>
explicit GenericPayloadSizedByDivisionView(
Arg0&& emboss_reserved_local_arg0, Arg1&& emboss_reserved_local_arg1,
Args&&... emboss_reserved_local_args)
: backing_(::std::forward<Arg0>(emboss_reserved_local_arg0),
::std::forward<Arg1>(emboss_reserved_local_arg1),
::std::forward<Args>(emboss_reserved_local_args)...) {}
template <typename OtherStorage>
GenericPayloadSizedByDivisionView<Storage>& operator=(
const GenericPayloadSizedByDivisionView<OtherStorage>&
emboss_reserved_local_other) {
backing_ = emboss_reserved_local_other.BackingStorage();
return *this;
}
bool Ok() const {
if (!IsComplete()) return false;
if (!has_divisor().Known()) return false;
if (has_divisor().ValueOrDefault() && !divisor().Ok()) return false;
if (!has_payload().Known()) return false;
if (has_payload().ValueOrDefault() && !payload().Ok()) return false;
if (!has_IntrinsicSizeInBytes().Known()) return false;
if (has_IntrinsicSizeInBytes().ValueOrDefault() &&
!IntrinsicSizeInBytes().Ok())
return false;
if (!has_MaxSizeInBytes().Known()) return false;
if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok())
return false;
if (!has_MinSizeInBytes().Known()) return false;
if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok())
return false;
return true;
}
Storage BackingStorage() const { return backing_; }
bool IsComplete() const {
return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) ||
(backing_.Ok() && IntrinsicSizeInBytes().Ok() &&
backing_.SizeInBytes() >=
static_cast</**/ ::std::size_t>(
IntrinsicSizeInBytes().UncheckedRead()));
}
::std::size_t SizeInBytes() const {
return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read());
}
bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); }
template <typename OtherStorage>
bool Equals(GenericPayloadSizedByDivisionView<OtherStorage>
emboss_reserved_local_other) const {
if (!has_divisor().Known()) return false;
if (!emboss_reserved_local_other.has_divisor().Known()) return false;
if (emboss_reserved_local_other.has_divisor().ValueOrDefault() &&
!has_divisor().ValueOrDefault())
return false;
if (has_divisor().ValueOrDefault() &&
!emboss_reserved_local_other.has_divisor().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_divisor().ValueOrDefault() &&
has_divisor().ValueOrDefault() &&
!divisor().Equals(emboss_reserved_local_other.divisor()))
return false;
if (!has_payload().Known()) return false;
if (!emboss_reserved_local_other.has_payload().Known()) return false;
if (emboss_reserved_local_other.has_payload().ValueOrDefault() &&
!has_payload().ValueOrDefault())
return false;
if (has_payload().ValueOrDefault() &&
!emboss_reserved_local_other.has_payload().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_payload().ValueOrDefault() &&
has_payload().ValueOrDefault() &&
!payload().Equals(emboss_reserved_local_other.payload()))
return false;
return true;
}
template <typename OtherStorage>
bool UncheckedEquals(GenericPayloadSizedByDivisionView<OtherStorage>
emboss_reserved_local_other) const {
if (emboss_reserved_local_other.has_divisor().ValueOr(false) &&
!has_divisor().ValueOr(false))
return false;
if (has_divisor().ValueOr(false) &&
!emboss_reserved_local_other.has_divisor().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_divisor().ValueOr(false) &&
has_divisor().ValueOr(false) &&
!divisor().UncheckedEquals(emboss_reserved_local_other.divisor()))
return false;
if (emboss_reserved_local_other.has_payload().ValueOr(false) &&
!has_payload().ValueOr(false))
return false;
if (has_payload().ValueOr(false) &&
!emboss_reserved_local_other.has_payload().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_payload().ValueOr(false) &&
has_payload().ValueOr(false) &&
!payload().UncheckedEquals(emboss_reserved_local_other.payload()))
return false;
return true;
}
template <typename OtherStorage>
void UncheckedCopyFrom(GenericPayloadSizedByDivisionView<OtherStorage>
emboss_reserved_local_other) const {
backing_.UncheckedCopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead());
}
template <typename OtherStorage>
void CopyFrom(GenericPayloadSizedByDivisionView<OtherStorage>
emboss_reserved_local_other) const {
backing_.CopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().Read());
}
template <typename OtherStorage>
bool TryToCopyFrom(GenericPayloadSizedByDivisionView<OtherStorage>
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 <class Stream>
bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const {
::std::string emboss_reserved_local_brace;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_brace))
return false;
if (emboss_reserved_local_brace != "{") return false;
for (;;) {
::std::string emboss_reserved_local_name;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_name))
return false;
if (emboss_reserved_local_name == ",")
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_name))
return false;
if (emboss_reserved_local_name == "}") return true;
::std::string emboss_reserved_local_colon;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_colon))
return false;
if (emboss_reserved_local_colon != ":") return false;
if (emboss_reserved_local_name == "divisor") {
if (!divisor().UpdateFromTextStream(emboss_reserved_local_stream)) {
return false;
}
continue;
}
if (emboss_reserved_local_name == "payload") {
if (!payload().UpdateFromTextStream(emboss_reserved_local_stream)) {
return false;
}
continue;
}
return false;
}
}
template <class Stream>
void WriteToTextStream(
Stream* emboss_reserved_local_stream,
::emboss::TextOutputOptions emboss_reserved_local_options) const {
::emboss::TextOutputOptions emboss_reserved_local_field_options =
emboss_reserved_local_options.PlusOneIndent();
if (emboss_reserved_local_options.multiline()) {
emboss_reserved_local_stream->Write("{\n");
} else {
emboss_reserved_local_stream->Write("{");
}
bool emboss_reserved_local_wrote_field = false;
if (has_divisor().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
divisor().IsAggregate() || divisor().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
} else {
if (emboss_reserved_local_wrote_field) {
emboss_reserved_local_stream->Write(",");
}
emboss_reserved_local_stream->Write(" ");
}
emboss_reserved_local_stream->Write("divisor: ");
divisor().WriteToTextStream(emboss_reserved_local_stream,
emboss_reserved_local_field_options);
emboss_reserved_local_wrote_field = true;
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write("\n");
}
} else if (emboss_reserved_local_field_options.allow_partial_output() &&
emboss_reserved_local_field_options.comments() &&
!divisor().IsAggregate() && !divisor().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
}
emboss_reserved_local_stream->Write("# divisor: UNREADABLE\n");
}
}
if (has_payload().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
payload().IsAggregate() || payload().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
} else {
if (emboss_reserved_local_wrote_field) {
emboss_reserved_local_stream->Write(",");
}
emboss_reserved_local_stream->Write(" ");
}
emboss_reserved_local_stream->Write("payload: ");
payload().WriteToTextStream(emboss_reserved_local_stream,
emboss_reserved_local_field_options);
emboss_reserved_local_wrote_field = true;
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write("\n");
}
} else if (emboss_reserved_local_field_options.allow_partial_output() &&
emboss_reserved_local_field_options.comments() &&
!payload().IsAggregate() && !payload().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
}
emboss_reserved_local_stream->Write("# payload: UNREADABLE\n");
}
}
(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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
8>>
divisor() const;
::emboss::support::Maybe<bool> has_divisor() const;
public:
typename ::emboss::support::GenericArrayView<
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType<
/**/ 0, 1>::template OffsetStorageType</**/ 1, 0>>,
8>>
,
typename Storage::template OffsetStorageType</**/ 0, 1>, 1, 8>
payload() const;
::emboss::support::Maybe<bool> has_payload() const;
public:
class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
const GenericPayloadSizedByDivisionView& emboss_reserved_local_view)
: view_(emboss_reserved_local_view) {}
EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = delete;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=(
const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=(
EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default;
::std::int32_t Read() const {
EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false));
auto emboss_reserved_local_value = MaybeRead();
EMBOSS_CHECK(emboss_reserved_local_value.Known());
EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault()));
return emboss_reserved_local_value.ValueOrDefault();
}
::std::int32_t UncheckedRead() const {
return MaybeRead().ValueOrDefault();
}
bool Ok() const {
auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known() &&
ValueIsOk(emboss_reserved_local_value.ValueOrDefault());
}
::emboss::support::Maybe<bool> IsUndefined() const {
const auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known()
? ::emboss::support::Maybe<bool>(false)
: (emboss_reserved_local_value.IsUndefined()
? ::emboss::support::Maybe<bool>(true)
: ::emboss::support::Maybe<bool>());
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
private:
::emboss::support::Maybe</**/ ::std::int32_t> MaybeRead() const {
const auto emboss_reserved_local_subexpr_1 = view_.divisor();
const auto emboss_reserved_local_subexpr_2 =
(emboss_reserved_local_subexpr_1.Ok()
? ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(
emboss_reserved_local_subexpr_1.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int32_t>());
const auto emboss_reserved_local_subexpr_3 =
::emboss::support::FlooringQuotient</**/ ::std::int32_t,
::std::int32_t, ::std::int32_t,
::std::int32_t>(
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(16LL)),
emboss_reserved_local_subexpr_2);
const auto emboss_reserved_local_subexpr_4 =
::emboss::support::Sum</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL)),
emboss_reserved_local_subexpr_3);
const auto emboss_reserved_local_subexpr_5 =
::emboss::support::Choice</**/ ::std::int32_t, ::std::int32_t, bool,
::std::int32_t, ::std::int32_t>(
::emboss::support::Maybe</**/ bool>(true),
emboss_reserved_local_subexpr_4,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL)));
const auto emboss_reserved_local_subexpr_6 =
::emboss::support::Maximum</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t,
::std::int32_t>(
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL)),
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL)),
emboss_reserved_local_subexpr_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<bool>(true).ValueOr(false);
}
const GenericPayloadSizedByDivisionView view_;
};
EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes()
const;
::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() const;
public:
class EmbossReservedDollarVirtualMaxSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {}
EmbossReservedDollarVirtualMaxSizeInBytesView(
const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView(
EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView& operator=(
const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView& operator=(
EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualMaxSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView
MaxSizeInBytes() {
return EmbossReservedDollarVirtualMaxSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedDollarVirtualMinSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {}
EmbossReservedDollarVirtualMinSizeInBytesView(
const EmbossReservedDollarVirtualMinSizeInBytesView&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView(
EmbossReservedDollarVirtualMinSizeInBytesView&&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView& operator=(
const EmbossReservedDollarVirtualMinSizeInBytesView&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView& operator=(
EmbossReservedDollarVirtualMinSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualMinSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualMinSizeInBytesView
MinSizeInBytes() {
return EmbossReservedDollarVirtualMinSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
private:
Storage backing_;
template <class OtherStorage>
friend class GenericPayloadSizedByDivisionView;
};
using PayloadSizedByDivisionView = GenericPayloadSizedByDivisionView<
/**/ ::emboss::support::ReadOnlyContiguousBuffer>;
using PayloadSizedByDivisionWriter = GenericPayloadSizedByDivisionView<
/**/ ::emboss::support::ReadWriteContiguousBuffer>;
template <class View>
struct EmbossReservedInternalIsGenericPayloadSizedByDivisionView {
static constexpr const bool value = false;
};
template <class Storage>
struct EmbossReservedInternalIsGenericPayloadSizedByDivisionView<
GenericPayloadSizedByDivisionView<Storage>> {
static constexpr const bool value = true;
};
template <typename T>
inline GenericPayloadSizedByDivisionView<
/**/ ::emboss::support::ContiguousBuffer<
typename ::std::remove_reference<
decltype(*::std::declval<T>()->data())>::type,
1, 0>>
MakePayloadSizedByDivisionView(T&& emboss_reserved_local_arg) {
return GenericPayloadSizedByDivisionView<
/**/ ::emboss::support::ContiguousBuffer<
typename ::std::remove_reference<
decltype(*::std::declval<T>()->data())>::type,
1, 0>>(::std::forward<T>(emboss_reserved_local_arg));
}
template <typename T>
inline GenericPayloadSizedByDivisionView<
/**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>
MakePayloadSizedByDivisionView(T* emboss_reserved_local_data,
::std::size_t emboss_reserved_local_size) {
return GenericPayloadSizedByDivisionView<
/**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>(
emboss_reserved_local_data, emboss_reserved_local_size);
}
template <typename T, ::std::size_t kAlignment>
inline GenericPayloadSizedByDivisionView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>
MakeAlignedPayloadSizedByDivisionView(
T* emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) {
return GenericPayloadSizedByDivisionView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>(
emboss_reserved_local_data, emboss_reserved_local_size);
}
namespace FieldGatedByDivision {} // namespace FieldGatedByDivision
template <class View>
struct EmbossReservedInternalIsGenericFieldGatedByDivisionView;
template <class Storage>
class GenericFieldGatedByDivisionView final {
public:
GenericFieldGatedByDivisionView() : backing_() {}
explicit GenericFieldGatedByDivisionView(Storage emboss_reserved_local_bytes)
: backing_(emboss_reserved_local_bytes) {}
template <typename OtherStorage>
GenericFieldGatedByDivisionView(
const GenericFieldGatedByDivisionView<OtherStorage>&
emboss_reserved_local_other)
: backing_{emboss_reserved_local_other.BackingStorage()} {}
template <typename Arg,
typename = typename ::std::enable_if<
!EmbossReservedInternalIsGenericFieldGatedByDivisionView<
typename ::std::remove_cv<typename ::std::remove_reference<
Arg>::type>::type>::value>::type>
explicit GenericFieldGatedByDivisionView(Arg&& emboss_reserved_local_arg)
: backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {}
template <typename Arg0, typename Arg1, typename... Args>
explicit GenericFieldGatedByDivisionView(Arg0&& emboss_reserved_local_arg0,
Arg1&& emboss_reserved_local_arg1,
Args&&... emboss_reserved_local_args)
: backing_(::std::forward<Arg0>(emboss_reserved_local_arg0),
::std::forward<Arg1>(emboss_reserved_local_arg1),
::std::forward<Args>(emboss_reserved_local_args)...) {}
template <typename OtherStorage>
GenericFieldGatedByDivisionView<Storage>& operator=(
const GenericFieldGatedByDivisionView<OtherStorage>&
emboss_reserved_local_other) {
backing_ = emboss_reserved_local_other.BackingStorage();
return *this;
}
bool Ok() const {
if (!IsComplete()) return false;
if (!has_divisor().Known()) return false;
if (has_divisor().ValueOrDefault() && !divisor().Ok()) return false;
if (!has_IntrinsicSizeInBytes().Known()) return false;
if (has_IntrinsicSizeInBytes().ValueOrDefault() &&
!IntrinsicSizeInBytes().Ok())
return false;
if (!has_MaxSizeInBytes().Known()) return false;
if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok())
return false;
if (!has_MinSizeInBytes().Known()) return false;
if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok())
return false;
if (!has_gated().Known()) return false;
if (has_gated().ValueOrDefault() && !gated().Ok()) return false;
return true;
}
Storage BackingStorage() const { return backing_; }
bool IsComplete() const {
return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) ||
(backing_.Ok() && IntrinsicSizeInBytes().Ok() &&
backing_.SizeInBytes() >=
static_cast</**/ ::std::size_t>(
IntrinsicSizeInBytes().UncheckedRead()));
}
::std::size_t SizeInBytes() const {
return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read());
}
bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); }
template <typename OtherStorage>
bool Equals(GenericFieldGatedByDivisionView<OtherStorage>
emboss_reserved_local_other) const {
if (!has_divisor().Known()) return false;
if (!emboss_reserved_local_other.has_divisor().Known()) return false;
if (emboss_reserved_local_other.has_divisor().ValueOrDefault() &&
!has_divisor().ValueOrDefault())
return false;
if (has_divisor().ValueOrDefault() &&
!emboss_reserved_local_other.has_divisor().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_divisor().ValueOrDefault() &&
has_divisor().ValueOrDefault() &&
!divisor().Equals(emboss_reserved_local_other.divisor()))
return false;
if (!has_gated().Known()) return false;
if (!emboss_reserved_local_other.has_gated().Known()) return false;
if (emboss_reserved_local_other.has_gated().ValueOrDefault() &&
!has_gated().ValueOrDefault())
return false;
if (has_gated().ValueOrDefault() &&
!emboss_reserved_local_other.has_gated().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_gated().ValueOrDefault() &&
has_gated().ValueOrDefault() &&
!gated().Equals(emboss_reserved_local_other.gated()))
return false;
return true;
}
template <typename OtherStorage>
bool UncheckedEquals(GenericFieldGatedByDivisionView<OtherStorage>
emboss_reserved_local_other) const {
if (emboss_reserved_local_other.has_divisor().ValueOr(false) &&
!has_divisor().ValueOr(false))
return false;
if (has_divisor().ValueOr(false) &&
!emboss_reserved_local_other.has_divisor().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_divisor().ValueOr(false) &&
has_divisor().ValueOr(false) &&
!divisor().UncheckedEquals(emboss_reserved_local_other.divisor()))
return false;
if (emboss_reserved_local_other.has_gated().ValueOr(false) &&
!has_gated().ValueOr(false))
return false;
if (has_gated().ValueOr(false) &&
!emboss_reserved_local_other.has_gated().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_gated().ValueOr(false) &&
has_gated().ValueOr(false) &&
!gated().UncheckedEquals(emboss_reserved_local_other.gated()))
return false;
return true;
}
template <typename OtherStorage>
void UncheckedCopyFrom(GenericFieldGatedByDivisionView<OtherStorage>
emboss_reserved_local_other) const {
backing_.UncheckedCopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead());
}
template <typename OtherStorage>
void CopyFrom(GenericFieldGatedByDivisionView<OtherStorage>
emboss_reserved_local_other) const {
backing_.CopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().Read());
}
template <typename OtherStorage>
bool TryToCopyFrom(GenericFieldGatedByDivisionView<OtherStorage>
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 <class Stream>
bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const {
::std::string emboss_reserved_local_brace;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_brace))
return false;
if (emboss_reserved_local_brace != "{") return false;
for (;;) {
::std::string emboss_reserved_local_name;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_name))
return false;
if (emboss_reserved_local_name == ",")
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_name))
return false;
if (emboss_reserved_local_name == "}") return true;
::std::string emboss_reserved_local_colon;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_colon))
return false;
if (emboss_reserved_local_colon != ":") return false;
if (emboss_reserved_local_name == "divisor") {
if (!divisor().UpdateFromTextStream(emboss_reserved_local_stream)) {
return false;
}
continue;
}
if (emboss_reserved_local_name == "gated") {
if (!gated().UpdateFromTextStream(emboss_reserved_local_stream)) {
return false;
}
continue;
}
return false;
}
}
template <class Stream>
void WriteToTextStream(
Stream* emboss_reserved_local_stream,
::emboss::TextOutputOptions emboss_reserved_local_options) const {
::emboss::TextOutputOptions emboss_reserved_local_field_options =
emboss_reserved_local_options.PlusOneIndent();
if (emboss_reserved_local_options.multiline()) {
emboss_reserved_local_stream->Write("{\n");
} else {
emboss_reserved_local_stream->Write("{");
}
bool emboss_reserved_local_wrote_field = false;
if (has_divisor().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
divisor().IsAggregate() || divisor().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
} else {
if (emboss_reserved_local_wrote_field) {
emboss_reserved_local_stream->Write(",");
}
emboss_reserved_local_stream->Write(" ");
}
emboss_reserved_local_stream->Write("divisor: ");
divisor().WriteToTextStream(emboss_reserved_local_stream,
emboss_reserved_local_field_options);
emboss_reserved_local_wrote_field = true;
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write("\n");
}
} else if (emboss_reserved_local_field_options.allow_partial_output() &&
emboss_reserved_local_field_options.comments() &&
!divisor().IsAggregate() && !divisor().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
}
emboss_reserved_local_stream->Write("# divisor: UNREADABLE\n");
}
}
if (has_gated().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
gated().IsAggregate() || gated().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
} else {
if (emboss_reserved_local_wrote_field) {
emboss_reserved_local_stream->Write(",");
}
emboss_reserved_local_stream->Write(" ");
}
emboss_reserved_local_stream->Write("gated: ");
gated().WriteToTextStream(emboss_reserved_local_stream,
emboss_reserved_local_field_options);
emboss_reserved_local_wrote_field = true;
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write("\n");
}
} else if (emboss_reserved_local_field_options.allow_partial_output() &&
emboss_reserved_local_field_options.comments() &&
!gated().IsAggregate() && !gated().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
}
emboss_reserved_local_stream->Write("# gated: 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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
8>>
divisor() const;
::emboss::support::Maybe<bool> has_divisor() const;
public:
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 1>>,
8>>
gated() const;
::emboss::support::Maybe<bool> has_gated() const;
public:
class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
const GenericFieldGatedByDivisionView& emboss_reserved_local_view)
: view_(emboss_reserved_local_view) {}
EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = delete;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=(
const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=(
EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default;
::std::int32_t Read() const {
EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false));
auto emboss_reserved_local_value = MaybeRead();
EMBOSS_CHECK(emboss_reserved_local_value.Known());
EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault()));
return emboss_reserved_local_value.ValueOrDefault();
}
::std::int32_t UncheckedRead() const {
return MaybeRead().ValueOrDefault();
}
bool Ok() const {
auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known() &&
ValueIsOk(emboss_reserved_local_value.ValueOrDefault());
}
::emboss::support::Maybe<bool> IsUndefined() const {
const auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known()
? ::emboss::support::Maybe<bool>(false)
: (emboss_reserved_local_value.IsUndefined()
? ::emboss::support::Maybe<bool>(true)
: ::emboss::support::Maybe<bool>());
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
private:
::emboss::support::Maybe</**/ ::std::int32_t> MaybeRead() const {
const auto emboss_reserved_local_subexpr_1 = view_.divisor();
const auto emboss_reserved_local_subexpr_2 =
(emboss_reserved_local_subexpr_1.Ok()
? ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(
emboss_reserved_local_subexpr_1.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int32_t>());
const auto emboss_reserved_local_subexpr_3 =
::emboss::support::FlooringQuotient</**/ ::std::int32_t,
::std::int32_t, ::std::int32_t,
::std::int32_t>(
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(12LL)),
emboss_reserved_local_subexpr_2);
const auto emboss_reserved_local_subexpr_4 =
::emboss::support::Equal</**/ ::std::int32_t, bool, ::std::int32_t,
::std::int32_t>(
emboss_reserved_local_subexpr_3,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(3LL)));
const auto emboss_reserved_local_subexpr_5 =
::emboss::support::Choice</**/ ::std::int32_t, ::std::int32_t, bool,
::std::int32_t, ::std::int32_t>(
emboss_reserved_local_subexpr_4,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(2LL)),
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL)));
const auto emboss_reserved_local_subexpr_6 =
::emboss::support::Maximum</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t,
::std::int32_t>(
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL)),
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL)),
emboss_reserved_local_subexpr_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<bool>(true).ValueOr(false);
}
const GenericFieldGatedByDivisionView view_;
};
EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes()
const;
::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() const;
public:
class EmbossReservedDollarVirtualMaxSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {}
EmbossReservedDollarVirtualMaxSizeInBytesView(
const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView(
EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView& operator=(
const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView& operator=(
EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualMaxSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView
MaxSizeInBytes() {
return EmbossReservedDollarVirtualMaxSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedDollarVirtualMinSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {}
EmbossReservedDollarVirtualMinSizeInBytesView(
const EmbossReservedDollarVirtualMinSizeInBytesView&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView(
EmbossReservedDollarVirtualMinSizeInBytesView&&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView& operator=(
const EmbossReservedDollarVirtualMinSizeInBytesView&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView& operator=(
EmbossReservedDollarVirtualMinSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualMinSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualMinSizeInBytesView
MinSizeInBytes() {
return EmbossReservedDollarVirtualMinSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
private:
Storage backing_;
template <class OtherStorage>
friend class GenericFieldGatedByDivisionView;
};
using FieldGatedByDivisionView = GenericFieldGatedByDivisionView<
/**/ ::emboss::support::ReadOnlyContiguousBuffer>;
using FieldGatedByDivisionWriter = GenericFieldGatedByDivisionView<
/**/ ::emboss::support::ReadWriteContiguousBuffer>;
template <class View>
struct EmbossReservedInternalIsGenericFieldGatedByDivisionView {
static constexpr const bool value = false;
};
template <class Storage>
struct EmbossReservedInternalIsGenericFieldGatedByDivisionView<
GenericFieldGatedByDivisionView<Storage>> {
static constexpr const bool value = true;
};
template <typename T>
inline GenericFieldGatedByDivisionView<
/**/ ::emboss::support::ContiguousBuffer<
typename ::std::remove_reference<
decltype(*::std::declval<T>()->data())>::type,
1, 0>>
MakeFieldGatedByDivisionView(T&& emboss_reserved_local_arg) {
return GenericFieldGatedByDivisionView<
/**/ ::emboss::support::ContiguousBuffer<
typename ::std::remove_reference<
decltype(*::std::declval<T>()->data())>::type,
1, 0>>(::std::forward<T>(emboss_reserved_local_arg));
}
template <typename T>
inline GenericFieldGatedByDivisionView<
/**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>
MakeFieldGatedByDivisionView(T* emboss_reserved_local_data,
::std::size_t emboss_reserved_local_size) {
return GenericFieldGatedByDivisionView<
/**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>(
emboss_reserved_local_data, emboss_reserved_local_size);
}
template <typename T, ::std::size_t kAlignment>
inline GenericFieldGatedByDivisionView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>
MakeAlignedFieldGatedByDivisionView(T* emboss_reserved_local_data,
::std::size_t emboss_reserved_local_size) {
return GenericFieldGatedByDivisionView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>(
emboss_reserved_local_data, emboss_reserved_local_size);
}
namespace CollapsingQuotient {} // namespace CollapsingQuotient
template <class View>
struct EmbossReservedInternalIsGenericCollapsingQuotientView;
template <class Storage>
class GenericCollapsingQuotientView final {
public:
GenericCollapsingQuotientView() : backing_() {}
explicit GenericCollapsingQuotientView(Storage emboss_reserved_local_bytes)
: backing_(emboss_reserved_local_bytes) {}
template <typename OtherStorage>
GenericCollapsingQuotientView(
const GenericCollapsingQuotientView<OtherStorage>&
emboss_reserved_local_other)
: backing_{emboss_reserved_local_other.BackingStorage()} {}
template <typename Arg,
typename = typename ::std::enable_if<
!EmbossReservedInternalIsGenericCollapsingQuotientView<
typename ::std::remove_cv<typename ::std::remove_reference<
Arg>::type>::type>::value>::type>
explicit GenericCollapsingQuotientView(Arg&& emboss_reserved_local_arg)
: backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {}
template <typename Arg0, typename Arg1, typename... Args>
explicit GenericCollapsingQuotientView(Arg0&& emboss_reserved_local_arg0,
Arg1&& emboss_reserved_local_arg1,
Args&&... emboss_reserved_local_args)
: backing_(::std::forward<Arg0>(emboss_reserved_local_arg0),
::std::forward<Arg1>(emboss_reserved_local_arg1),
::std::forward<Args>(emboss_reserved_local_args)...) {}
template <typename OtherStorage>
GenericCollapsingQuotientView<Storage>& operator=(
const GenericCollapsingQuotientView<OtherStorage>&
emboss_reserved_local_other) {
backing_ = emboss_reserved_local_other.BackingStorage();
return *this;
}
bool Ok() const {
if (!IsComplete()) return false;
if (!has_divisor().Known()) return false;
if (has_divisor().ValueOrDefault() && !divisor().Ok()) return false;
if (!has_zero_or_undefined().Known()) return false;
if (has_zero_or_undefined().ValueOrDefault() && !zero_or_undefined().Ok())
return false;
if (!has_IntrinsicSizeInBytes().Known()) return false;
if (has_IntrinsicSizeInBytes().ValueOrDefault() &&
!IntrinsicSizeInBytes().Ok())
return false;
if (!has_MaxSizeInBytes().Known()) return false;
if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok())
return false;
if (!has_MinSizeInBytes().Known()) return false;
if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok())
return false;
return true;
}
Storage BackingStorage() const { return backing_; }
bool IsComplete() const {
return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) ||
(backing_.Ok() && IntrinsicSizeInBytes().Ok() &&
backing_.SizeInBytes() >=
static_cast</**/ ::std::size_t>(
IntrinsicSizeInBytes().UncheckedRead()));
}
static constexpr ::std::size_t SizeInBytes() {
return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read());
}
static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); }
template <typename OtherStorage>
bool Equals(GenericCollapsingQuotientView<OtherStorage>
emboss_reserved_local_other) const {
if (!has_divisor().Known()) return false;
if (!emboss_reserved_local_other.has_divisor().Known()) return false;
if (emboss_reserved_local_other.has_divisor().ValueOrDefault() &&
!has_divisor().ValueOrDefault())
return false;
if (has_divisor().ValueOrDefault() &&
!emboss_reserved_local_other.has_divisor().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_divisor().ValueOrDefault() &&
has_divisor().ValueOrDefault() &&
!divisor().Equals(emboss_reserved_local_other.divisor()))
return false;
return true;
}
template <typename OtherStorage>
bool UncheckedEquals(GenericCollapsingQuotientView<OtherStorage>
emboss_reserved_local_other) const {
if (emboss_reserved_local_other.has_divisor().ValueOr(false) &&
!has_divisor().ValueOr(false))
return false;
if (has_divisor().ValueOr(false) &&
!emboss_reserved_local_other.has_divisor().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_divisor().ValueOr(false) &&
has_divisor().ValueOr(false) &&
!divisor().UncheckedEquals(emboss_reserved_local_other.divisor()))
return false;
return true;
}
template <typename OtherStorage>
void UncheckedCopyFrom(GenericCollapsingQuotientView<OtherStorage>
emboss_reserved_local_other) const {
backing_.UncheckedCopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead());
}
template <typename OtherStorage>
void CopyFrom(GenericCollapsingQuotientView<OtherStorage>
emboss_reserved_local_other) const {
backing_.CopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().Read());
}
template <typename OtherStorage>
bool TryToCopyFrom(GenericCollapsingQuotientView<OtherStorage>
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 <class Stream>
bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const {
::std::string emboss_reserved_local_brace;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_brace))
return false;
if (emboss_reserved_local_brace != "{") return false;
for (;;) {
::std::string emboss_reserved_local_name;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_name))
return false;
if (emboss_reserved_local_name == ",")
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_name))
return false;
if (emboss_reserved_local_name == "}") return true;
::std::string emboss_reserved_local_colon;
if (!::emboss::support::ReadToken(emboss_reserved_local_stream,
&emboss_reserved_local_colon))
return false;
if (emboss_reserved_local_colon != ":") return false;
if (emboss_reserved_local_name == "divisor") {
if (!divisor().UpdateFromTextStream(emboss_reserved_local_stream)) {
return false;
}
continue;
}
return false;
}
}
template <class Stream>
void WriteToTextStream(
Stream* emboss_reserved_local_stream,
::emboss::TextOutputOptions emboss_reserved_local_options) const {
::emboss::TextOutputOptions emboss_reserved_local_field_options =
emboss_reserved_local_options.PlusOneIndent();
if (emboss_reserved_local_options.multiline()) {
emboss_reserved_local_stream->Write("{\n");
} else {
emboss_reserved_local_stream->Write("{");
}
bool emboss_reserved_local_wrote_field = false;
if (has_divisor().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
divisor().IsAggregate() || divisor().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
} else {
if (emboss_reserved_local_wrote_field) {
emboss_reserved_local_stream->Write(",");
}
emboss_reserved_local_stream->Write(" ");
}
emboss_reserved_local_stream->Write("divisor: ");
divisor().WriteToTextStream(emboss_reserved_local_stream,
emboss_reserved_local_field_options);
emboss_reserved_local_wrote_field = true;
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write("\n");
}
} else if (emboss_reserved_local_field_options.allow_partial_output() &&
emboss_reserved_local_field_options.comments() &&
!divisor().IsAggregate() && !divisor().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
}
emboss_reserved_local_stream->Write("# divisor: UNREADABLE\n");
}
}
if (has_zero_or_undefined().ValueOr(false) &&
emboss_reserved_local_field_options.comments()) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
zero_or_undefined().IsAggregate() || zero_or_undefined().Ok()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
emboss_reserved_local_stream->Write("# zero_or_undefined: ");
zero_or_undefined().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(
"# zero_or_undefined: 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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
8>>
divisor() const;
::emboss::support::Maybe<bool> has_divisor() const;
public:
class EmbossReservedVirtualZeroOrUndefinedView final {
public:
using ValueType = ::std::int32_t;
explicit EmbossReservedVirtualZeroOrUndefinedView(
const GenericCollapsingQuotientView& emboss_reserved_local_view)
: view_(emboss_reserved_local_view) {}
EmbossReservedVirtualZeroOrUndefinedView() = delete;
EmbossReservedVirtualZeroOrUndefinedView(
const EmbossReservedVirtualZeroOrUndefinedView&) = default;
EmbossReservedVirtualZeroOrUndefinedView(
EmbossReservedVirtualZeroOrUndefinedView&&) = default;
EmbossReservedVirtualZeroOrUndefinedView& operator=(
const EmbossReservedVirtualZeroOrUndefinedView&) = default;
EmbossReservedVirtualZeroOrUndefinedView& operator=(
EmbossReservedVirtualZeroOrUndefinedView&&) = default;
~EmbossReservedVirtualZeroOrUndefinedView() = default;
::std::int32_t Read() const {
EMBOSS_CHECK(view_.has_zero_or_undefined().ValueOr(false));
auto emboss_reserved_local_value = MaybeRead();
EMBOSS_CHECK(emboss_reserved_local_value.Known());
EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault()));
return emboss_reserved_local_value.ValueOrDefault();
}
::std::int32_t UncheckedRead() const {
return MaybeRead().ValueOrDefault();
}
bool Ok() const {
auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known() &&
ValueIsOk(emboss_reserved_local_value.ValueOrDefault());
}
::emboss::support::Maybe<bool> IsUndefined() const {
const auto emboss_reserved_local_value = MaybeRead();
return emboss_reserved_local_value.Known()
? ::emboss::support::Maybe<bool>(false)
: (emboss_reserved_local_value.IsUndefined()
? ::emboss::support::Maybe<bool>(true)
: ::emboss::support::Maybe<bool>());
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
private:
::emboss::support::Maybe</**/ ::std::int32_t> MaybeRead() const {
const auto emboss_reserved_local_subexpr_1 = view_.divisor();
const auto emboss_reserved_local_subexpr_2 =
(emboss_reserved_local_subexpr_1.Ok()
? ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(
emboss_reserved_local_subexpr_1.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int32_t>());
const auto emboss_reserved_local_subexpr_3 =
::emboss::support::FlooringQuotient</**/ ::std::int32_t,
::std::int32_t, ::std::int32_t,
::std::int32_t>(
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL)),
emboss_reserved_local_subexpr_2);
return emboss_reserved_local_subexpr_3;
}
static constexpr bool ValueIsOk(
::std::int32_t emboss_reserved_local_value) {
return (void)emboss_reserved_local_value, // Silence -Wunused-parameter
::emboss::support::Maybe<bool>(true).ValueOr(false);
}
const GenericCollapsingQuotientView view_;
};
EmbossReservedVirtualZeroOrUndefinedView zero_or_undefined() const;
::emboss::support::Maybe<bool> has_zero_or_undefined() const;
public:
class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView() {}
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(
EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=(
const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=(
EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView
IntrinsicSizeInBytes() {
return EmbossReservedDollarVirtualIntrinsicSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedDollarVirtualMaxSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {}
EmbossReservedDollarVirtualMaxSizeInBytesView(
const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView(
EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView& operator=(
const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default;
EmbossReservedDollarVirtualMaxSizeInBytesView& operator=(
EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualMaxSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView
MaxSizeInBytes() {
return EmbossReservedDollarVirtualMaxSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
public:
class EmbossReservedDollarVirtualMinSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {}
EmbossReservedDollarVirtualMinSizeInBytesView(
const EmbossReservedDollarVirtualMinSizeInBytesView&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView(
EmbossReservedDollarVirtualMinSizeInBytesView&&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView& operator=(
const EmbossReservedDollarVirtualMinSizeInBytesView&) = default;
EmbossReservedDollarVirtualMinSizeInBytesView& operator=(
EmbossReservedDollarVirtualMinSizeInBytesView&&) = default;
~EmbossReservedDollarVirtualMinSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
static constexpr ::emboss::support::Maybe<bool> IsUndefined() {
return ::emboss::support::Maybe<bool>(false);
}
template <class Stream>
void WriteToTextStream(Stream* emboss_reserved_local_stream,
const ::emboss::TextOutputOptions&
emboss_reserved_local_options) const {
::emboss::support::WriteIntegerViewToTextStream(
this, emboss_reserved_local_stream, emboss_reserved_local_options);
}
static constexpr bool IsAggregate() { return false; }
};
static constexpr EmbossReservedDollarVirtualMinSizeInBytesView
MinSizeInBytes() {
return EmbossReservedDollarVirtualMinSizeInBytesView();
}
static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() {
return ::emboss::support::Maybe<bool>(true);
}
private:
Storage backing_;
template <class OtherStorage>
friend class GenericCollapsingQuotientView;
};
using CollapsingQuotientView = GenericCollapsingQuotientView<
/**/ ::emboss::support::ReadOnlyContiguousBuffer>;
using CollapsingQuotientWriter = GenericCollapsingQuotientView<
/**/ ::emboss::support::ReadWriteContiguousBuffer>;
template <class View>
struct EmbossReservedInternalIsGenericCollapsingQuotientView {
static constexpr const bool value = false;
};
template <class Storage>
struct EmbossReservedInternalIsGenericCollapsingQuotientView<
GenericCollapsingQuotientView<Storage>> {
static constexpr const bool value = true;
};
template <typename T>
inline GenericCollapsingQuotientView<
/**/ ::emboss::support::ContiguousBuffer<
typename ::std::remove_reference<
decltype(*::std::declval<T>()->data())>::type,
1, 0>>
MakeCollapsingQuotientView(T&& emboss_reserved_local_arg) {
return GenericCollapsingQuotientView<
/**/ ::emboss::support::ContiguousBuffer<
typename ::std::remove_reference<
decltype(*::std::declval<T>()->data())>::type,
1, 0>>(::std::forward<T>(emboss_reserved_local_arg));
}
template <typename T>
inline GenericCollapsingQuotientView<
/**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>
MakeCollapsingQuotientView(T* emboss_reserved_local_data,
::std::size_t emboss_reserved_local_size) {
return GenericCollapsingQuotientView<
/**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>(
emboss_reserved_local_data, emboss_reserved_local_size);
}
template <typename T, ::std::size_t kAlignment>
inline GenericCollapsingQuotientView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>
MakeAlignedCollapsingQuotientView(T* emboss_reserved_local_data,
::std::size_t emboss_reserved_local_size) {
return GenericCollapsingQuotientView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>(
emboss_reserved_local_data, emboss_reserved_local_size);
}
namespace ArrayOfUint16BySizeInBytes {} // namespace ArrayOfUint16BySizeInBytes
template <class Storage>
inline typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
8>>
GenericArrayOfUint16BySizeInBytesView<Storage>::size_in_bytes() const {
if (has_size_in_bytes().ValueOr(false)) {
auto emboss_reserved_local_size =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL));
auto emboss_reserved_local_offset =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL));
if (emboss_reserved_local_size.Known() &&
emboss_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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
8>>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericArrayOfUint16BySizeInBytesView<Storage>::has_size_in_bytes() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename ::emboss::support::GenericArrayView<
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
16, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType<
/**/ 0, 1>::template OffsetStorageType</**/ 2, 0>>,
16>>
,
typename Storage::template OffsetStorageType</**/ 0, 1>, 2, 8>
GenericArrayOfUint16BySizeInBytesView<Storage>::elements() const {
if (has_elements().ValueOr(false)) {
const auto emboss_reserved_local_subexpr_1 = size_in_bytes();
const auto emboss_reserved_local_subexpr_2 =
(emboss_reserved_local_subexpr_1.Ok()
? ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(
emboss_reserved_local_subexpr_1.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int32_t>());
const auto emboss_reserved_local_subexpr_3 =
::emboss::support::FlooringQuotient</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
emboss_reserved_local_subexpr_2,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(2LL)));
const auto emboss_reserved_local_subexpr_4 =
::emboss::support::Product</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
emboss_reserved_local_subexpr_3,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(2LL)));
auto emboss_reserved_local_size = emboss_reserved_local_subexpr_4;
auto emboss_reserved_local_offset =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL));
if (emboss_reserved_local_size.Known() &&
emboss_reserved_local_size.ValueOr(0) >= 0 &&
emboss_reserved_local_offset.Known() &&
emboss_reserved_local_offset.ValueOr(0) >= 0) {
return ::emboss::support::GenericArrayView<
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
16, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType<
/**/ 0, 1>::template OffsetStorageType</**/ 2, 0>>,
16>>
,
typename Storage::template OffsetStorageType</**/ 0, 1>, 2, 8>
(backing_.template GetOffsetStorage<0, 1>(
emboss_reserved_local_offset.ValueOrDefault(),
emboss_reserved_local_size.ValueOrDefault()));
}
}
return ::emboss::support::GenericArrayView<
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
16, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType<
/**/ 0, 1>::template OffsetStorageType</**/ 2, 0>>,
16>>
,
typename Storage::template OffsetStorageType</**/ 0, 1>, 2, 8>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericArrayOfUint16BySizeInBytesView<Storage>::has_elements() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename GenericArrayOfUint16BySizeInBytesView<
Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView
GenericArrayOfUint16BySizeInBytesView<Storage>::IntrinsicSizeInBytes() const {
return typename GenericArrayOfUint16BySizeInBytesView<
Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView(*this);
}
template <class Storage>
inline ::emboss::support::Maybe<bool> GenericArrayOfUint16BySizeInBytesView<
Storage>::has_IntrinsicSizeInBytes() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
namespace ArrayOfUint16BySizeInBytes {
inline constexpr ::std::int32_t MaxSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(255LL))
.ValueOrDefault();
}
} // namespace ArrayOfUint16BySizeInBytes
template <class Storage>
inline constexpr ::std::int32_t GenericArrayOfUint16BySizeInBytesView<
Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() {
return ArrayOfUint16BySizeInBytes::MaxSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericArrayOfUint16BySizeInBytesView<
Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() {
return ArrayOfUint16BySizeInBytes::MaxSizeInBytes();
}
namespace ArrayOfUint16BySizeInBytes {
inline constexpr ::std::int32_t MinSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL))
.ValueOrDefault();
}
} // namespace ArrayOfUint16BySizeInBytes
template <class Storage>
inline constexpr ::std::int32_t GenericArrayOfUint16BySizeInBytesView<
Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() {
return ArrayOfUint16BySizeInBytes::MinSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericArrayOfUint16BySizeInBytesView<
Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() {
return ArrayOfUint16BySizeInBytes::MinSizeInBytes();
}
namespace ChunkedPayload {} // namespace ChunkedPayload
template <class Storage>
inline typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
8>>
GenericChunkedPayloadView<Storage>::chunk_count() const {
if (has_chunk_count().ValueOr(false)) {
auto emboss_reserved_local_size =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL));
auto emboss_reserved_local_offset =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL));
if (emboss_reserved_local_size.Known() &&
emboss_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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
8>>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericChunkedPayloadView<Storage>::has_chunk_count() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename ::emboss::support::GenericArrayView<
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType<
/**/ 0, 1>::template OffsetStorageType</**/ 1, 0>>,
8>>
,
typename Storage::template OffsetStorageType</**/ 0, 1>, 1, 8>
GenericChunkedPayloadView<Storage>::padded() const {
if (has_padded().ValueOr(false)) {
const auto emboss_reserved_local_subexpr_1 = chunk_count();
const auto emboss_reserved_local_subexpr_2 =
(emboss_reserved_local_subexpr_1.Ok()
? ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(
emboss_reserved_local_subexpr_1.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int32_t>());
const auto emboss_reserved_local_subexpr_3 =
::emboss::support::Sum</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
emboss_reserved_local_subexpr_2,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(3LL)));
const auto emboss_reserved_local_subexpr_4 =
::emboss::support::FlooringQuotient</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
emboss_reserved_local_subexpr_3,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(4LL)));
const auto emboss_reserved_local_subexpr_5 =
::emboss::support::Product</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
emboss_reserved_local_subexpr_4,
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(4LL)));
auto emboss_reserved_local_size = emboss_reserved_local_subexpr_5;
auto emboss_reserved_local_offset =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL));
if (emboss_reserved_local_size.Known() &&
emboss_reserved_local_size.ValueOr(0) >= 0 &&
emboss_reserved_local_offset.Known() &&
emboss_reserved_local_offset.ValueOr(0) >= 0) {
return ::emboss::support::GenericArrayView<
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType<
/**/ 0, 1>::template OffsetStorageType</**/ 1, 0>>,
8>>
,
typename Storage::template OffsetStorageType</**/ 0, 1>, 1, 8>
(backing_.template GetOffsetStorage<0, 1>(
emboss_reserved_local_offset.ValueOrDefault(),
emboss_reserved_local_size.ValueOrDefault()));
}
}
return ::emboss::support::GenericArrayView<
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType<
/**/ 0, 1>::template OffsetStorageType</**/ 1, 0>>,
8>>
,
typename Storage::template OffsetStorageType</**/ 0, 1>, 1, 8>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericChunkedPayloadView<Storage>::has_padded() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename GenericChunkedPayloadView<
Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView
GenericChunkedPayloadView<Storage>::IntrinsicSizeInBytes() const {
return typename GenericChunkedPayloadView<
Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView(*this);
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericChunkedPayloadView<Storage>::has_IntrinsicSizeInBytes() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
namespace ChunkedPayload {
inline constexpr ::std::int32_t MaxSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(257LL))
.ValueOrDefault();
}
} // namespace ChunkedPayload
template <class Storage>
inline constexpr ::std::int32_t GenericChunkedPayloadView<
Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() {
return ChunkedPayload::MaxSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericChunkedPayloadView<
Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() {
return ChunkedPayload::MaxSizeInBytes();
}
namespace ChunkedPayload {
inline constexpr ::std::int32_t MinSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL))
.ValueOrDefault();
}
} // namespace ChunkedPayload
template <class Storage>
inline constexpr ::std::int32_t GenericChunkedPayloadView<
Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() {
return ChunkedPayload::MinSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericChunkedPayloadView<
Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() {
return ChunkedPayload::MinSizeInBytes();
}
namespace Constants {} // namespace Constants
namespace Constants {
inline constexpr ::std::int32_t exact_quotient() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(20LL))
.ValueOrDefault();
}
} // namespace Constants
template <class Storage>
inline constexpr ::std::int32_t
GenericConstantsView<Storage>::EmbossReservedVirtualExactQuotientView::Read() {
return Constants::exact_quotient();
}
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedVirtualExactQuotientView::UncheckedRead() {
return Constants::exact_quotient();
}
namespace Constants {
inline constexpr ::std::int32_t truncating_quotient() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(14LL))
.ValueOrDefault();
}
} // namespace Constants
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedVirtualTruncatingQuotientView::Read() {
return Constants::truncating_quotient();
}
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedVirtualTruncatingQuotientView::UncheckedRead() {
return Constants::truncating_quotient();
}
namespace Constants {
inline constexpr ::std::int32_t negative_quotient() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(-4LL))
.ValueOrDefault();
}
} // namespace Constants
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedVirtualNegativeQuotientView::Read() {
return Constants::negative_quotient();
}
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedVirtualNegativeQuotientView::UncheckedRead() {
return Constants::negative_quotient();
}
namespace Constants {
inline constexpr ::std::int32_t exact_modulus() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL))
.ValueOrDefault();
}
} // namespace Constants
template <class Storage>
inline constexpr ::std::int32_t
GenericConstantsView<Storage>::EmbossReservedVirtualExactModulusView::Read() {
return Constants::exact_modulus();
}
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedVirtualExactModulusView::UncheckedRead() {
return Constants::exact_modulus();
}
namespace Constants {
inline constexpr ::std::int32_t truncating_modulus() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(2LL))
.ValueOrDefault();
}
} // namespace Constants
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedVirtualTruncatingModulusView::Read() {
return Constants::truncating_modulus();
}
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedVirtualTruncatingModulusView::UncheckedRead() {
return Constants::truncating_modulus();
}
namespace Constants {
inline constexpr ::std::int32_t negative_modulus() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL))
.ValueOrDefault();
}
} // namespace Constants
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedVirtualNegativeModulusView::Read() {
return Constants::negative_modulus();
}
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedVirtualNegativeModulusView::UncheckedRead() {
return Constants::negative_modulus();
}
namespace Constants {
inline constexpr ::std::int32_t chained_div() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(10LL))
.ValueOrDefault();
}
} // namespace Constants
template <class Storage>
inline constexpr ::std::int32_t
GenericConstantsView<Storage>::EmbossReservedVirtualChainedDivView::Read() {
return Constants::chained_div();
}
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedVirtualChainedDivView::UncheckedRead() {
return Constants::chained_div();
}
namespace Constants {
inline constexpr ::std::int32_t chained_mod() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(3LL))
.ValueOrDefault();
}
} // namespace Constants
template <class Storage>
inline constexpr ::std::int32_t
GenericConstantsView<Storage>::EmbossReservedVirtualChainedModView::Read() {
return Constants::chained_mod();
}
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedVirtualChainedModView::UncheckedRead() {
return Constants::chained_mod();
}
namespace Constants {
inline constexpr ::std::int32_t mixed_divmod() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL))
.ValueOrDefault();
}
} // namespace Constants
template <class Storage>
inline constexpr ::std::int32_t
GenericConstantsView<Storage>::EmbossReservedVirtualMixedDivmodView::Read() {
return Constants::mixed_divmod();
}
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedVirtualMixedDivmodView::UncheckedRead() {
return Constants::mixed_divmod();
}
namespace Constants {
inline constexpr ::std::int32_t IntrinsicSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL))
.ValueOrDefault();
}
} // namespace Constants
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() {
return Constants::IntrinsicSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<Storage>::
EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() {
return Constants::IntrinsicSizeInBytes();
}
namespace Constants {
inline constexpr ::std::int32_t MaxSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL))
.ValueOrDefault();
}
} // namespace Constants
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() {
return Constants::MaxSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() {
return Constants::MaxSizeInBytes();
}
namespace Constants {
inline constexpr ::std::int32_t MinSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL))
.ValueOrDefault();
}
} // namespace Constants
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() {
return Constants::MinSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericConstantsView<
Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() {
return Constants::MinSizeInBytes();
}
namespace SignedRuntimeDivision {} // namespace SignedRuntimeDivision
template <class Storage>
inline typename ::emboss::prelude::IntView<
/**/ ::emboss::support::FixedSizeViewParameters<
64, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
64>>
GenericSignedRuntimeDivisionView<Storage>::wide_dividend() const {
if (has_wide_dividend().ValueOr(false)) {
auto emboss_reserved_local_size =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(8LL));
auto emboss_reserved_local_offset =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL));
if (emboss_reserved_local_size.Known() &&
emboss_reserved_local_size.ValueOr(0) >= 0 &&
emboss_reserved_local_offset.Known() &&
emboss_reserved_local_offset.ValueOr(0) >= 0) {
return ::emboss::prelude::IntView<
/**/ ::emboss::support::FixedSizeViewParameters<
64, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
64>>
(backing_.template GetOffsetStorage<0, 0>(
emboss_reserved_local_offset.ValueOrDefault(),
emboss_reserved_local_size.ValueOrDefault()));
}
}
return ::emboss::prelude::IntView<
/**/ ::emboss::support::FixedSizeViewParameters<
64, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
64>>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericSignedRuntimeDivisionView<Storage>::has_wide_dividend() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename ::emboss::prelude::IntView<
/**/ ::emboss::support::FixedSizeViewParameters<
32, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 8>>,
32>>
GenericSignedRuntimeDivisionView<Storage>::narrow_dividend() const {
if (has_narrow_dividend().ValueOr(false)) {
auto emboss_reserved_local_size =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(4LL));
auto emboss_reserved_local_offset =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(8LL));
if (emboss_reserved_local_size.Known() &&
emboss_reserved_local_size.ValueOr(0) >= 0 &&
emboss_reserved_local_offset.Known() &&
emboss_reserved_local_offset.ValueOr(0) >= 0) {
return ::emboss::prelude::IntView<
/**/ ::emboss::support::FixedSizeViewParameters<
32, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 8>>,
32>>
(backing_.template GetOffsetStorage<0, 8>(
emboss_reserved_local_offset.ValueOrDefault(),
emboss_reserved_local_size.ValueOrDefault()));
}
}
return ::emboss::prelude::IntView<
/**/ ::emboss::support::FixedSizeViewParameters<
32, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 8>>,
32>>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericSignedRuntimeDivisionView<Storage>::has_narrow_dividend() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 12>>,
8>>
GenericSignedRuntimeDivisionView<Storage>::divisor_magnitude() const {
if (has_divisor_magnitude().ValueOr(false)) {
auto emboss_reserved_local_size =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL));
auto emboss_reserved_local_offset =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(12LL));
if (emboss_reserved_local_size.Known() &&
emboss_reserved_local_size.ValueOr(0) >= 0 &&
emboss_reserved_local_offset.Known() &&
emboss_reserved_local_offset.ValueOr(0) >= 0) {
return ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 12>>,
8>>
(backing_.template GetOffsetStorage<0, 12>(
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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 12>>,
8>>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericSignedRuntimeDivisionView<Storage>::has_divisor_magnitude() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedVirtualWideQuotientByConstantView
GenericSignedRuntimeDivisionView<Storage>::wide_quotient_by_constant() const {
return typename GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedVirtualWideQuotientByConstantView(*this);
}
template <class Storage>
inline ::emboss::support::Maybe<bool> GenericSignedRuntimeDivisionView<
Storage>::has_wide_quotient_by_constant() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedVirtualWideRemainderByConstantView
GenericSignedRuntimeDivisionView<Storage>::wide_remainder_by_constant() const {
return typename GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedVirtualWideRemainderByConstantView(*this);
}
template <class Storage>
inline ::emboss::support::Maybe<bool> GenericSignedRuntimeDivisionView<
Storage>::has_wide_remainder_by_constant() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedVirtualWideQuotientByDivisorView
GenericSignedRuntimeDivisionView<Storage>::wide_quotient_by_divisor() const {
return typename GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedVirtualWideQuotientByDivisorView(*this);
}
template <class Storage>
inline ::emboss::support::Maybe<bool> GenericSignedRuntimeDivisionView<
Storage>::has_wide_quotient_by_divisor() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedVirtualWideRemainderByNegativeDivisorView
GenericSignedRuntimeDivisionView<Storage>::wide_remainder_by_negative_divisor()
const {
return typename GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedVirtualWideRemainderByNegativeDivisorView(*this);
}
template <class Storage>
inline ::emboss::support::Maybe<bool> GenericSignedRuntimeDivisionView<
Storage>::has_wide_remainder_by_negative_divisor() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedVirtualNarrowQuotientByNegativeDivisorView
GenericSignedRuntimeDivisionView<Storage>::narrow_quotient_by_negative_divisor()
const {
return typename GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedVirtualNarrowQuotientByNegativeDivisorView(*this);
}
template <class Storage>
inline ::emboss::support::Maybe<bool> GenericSignedRuntimeDivisionView<
Storage>::has_narrow_quotient_by_negative_divisor() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedVirtualNarrowRemainderByNegativeDivisorView
GenericSignedRuntimeDivisionView<
Storage>::narrow_remainder_by_negative_divisor() const {
return typename GenericSignedRuntimeDivisionView<Storage>::
EmbossReservedVirtualNarrowRemainderByNegativeDivisorView(*this);
}
template <class Storage>
inline ::emboss::support::Maybe<bool> GenericSignedRuntimeDivisionView<
Storage>::has_narrow_remainder_by_negative_divisor() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
namespace SignedRuntimeDivision {
inline constexpr ::std::int32_t IntrinsicSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(13LL))
.ValueOrDefault();
}
} // namespace SignedRuntimeDivision
template <class Storage>
inline constexpr ::std::int32_t GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() {
return SignedRuntimeDivision::IntrinsicSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericSignedRuntimeDivisionView<Storage>::
EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() {
return SignedRuntimeDivision::IntrinsicSizeInBytes();
}
namespace SignedRuntimeDivision {
inline constexpr ::std::int32_t MaxSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(13LL))
.ValueOrDefault();
}
} // namespace SignedRuntimeDivision
template <class Storage>
inline constexpr ::std::int32_t GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() {
return SignedRuntimeDivision::MaxSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() {
return SignedRuntimeDivision::MaxSizeInBytes();
}
namespace SignedRuntimeDivision {
inline constexpr ::std::int32_t MinSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(13LL))
.ValueOrDefault();
}
} // namespace SignedRuntimeDivision
template <class Storage>
inline constexpr ::std::int32_t GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() {
return SignedRuntimeDivision::MinSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericSignedRuntimeDivisionView<
Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() {
return SignedRuntimeDivision::MinSizeInBytes();
}
namespace PayloadSizedByDivision {} // namespace PayloadSizedByDivision
template <class Storage>
inline typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
8>>
GenericPayloadSizedByDivisionView<Storage>::divisor() const {
if (has_divisor().ValueOr(false)) {
auto emboss_reserved_local_size =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL));
auto emboss_reserved_local_offset =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL));
if (emboss_reserved_local_size.Known() &&
emboss_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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
8>>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericPayloadSizedByDivisionView<Storage>::has_divisor() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename ::emboss::support::GenericArrayView<
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType<
/**/ 0, 1>::template OffsetStorageType</**/ 1, 0>>,
8>>
,
typename Storage::template OffsetStorageType</**/ 0, 1>, 1, 8>
GenericPayloadSizedByDivisionView<Storage>::payload() const {
if (has_payload().ValueOr(false)) {
const auto emboss_reserved_local_subexpr_1 = divisor();
const auto emboss_reserved_local_subexpr_2 =
(emboss_reserved_local_subexpr_1.Ok()
? ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(
emboss_reserved_local_subexpr_1.UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int32_t>());
const auto emboss_reserved_local_subexpr_3 =
::emboss::support::FlooringQuotient</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(16LL)),
emboss_reserved_local_subexpr_2);
auto emboss_reserved_local_size = emboss_reserved_local_subexpr_3;
auto emboss_reserved_local_offset =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL));
if (emboss_reserved_local_size.Known() &&
emboss_reserved_local_size.ValueOr(0) >= 0 &&
emboss_reserved_local_offset.Known() &&
emboss_reserved_local_offset.ValueOr(0) >= 0) {
return ::emboss::support::GenericArrayView<
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType<
/**/ 0, 1>::template OffsetStorageType</**/ 1, 0>>,
8>>
,
typename Storage::template OffsetStorageType</**/ 0, 1>, 1, 8>
(backing_.template GetOffsetStorage<0, 1>(
emboss_reserved_local_offset.ValueOrDefault(),
emboss_reserved_local_size.ValueOrDefault()));
}
}
return ::emboss::support::GenericArrayView<
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType<
/**/ 0, 1>::template OffsetStorageType</**/ 1, 0>>,
8>>
,
typename Storage::template OffsetStorageType</**/ 0, 1>, 1, 8>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericPayloadSizedByDivisionView<Storage>::has_payload() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename GenericPayloadSizedByDivisionView<
Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView
GenericPayloadSizedByDivisionView<Storage>::IntrinsicSizeInBytes() const {
return typename GenericPayloadSizedByDivisionView<
Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView(*this);
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericPayloadSizedByDivisionView<Storage>::has_IntrinsicSizeInBytes() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
namespace PayloadSizedByDivision {
inline constexpr ::std::int32_t MaxSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(17LL))
.ValueOrDefault();
}
} // namespace PayloadSizedByDivision
template <class Storage>
inline constexpr ::std::int32_t GenericPayloadSizedByDivisionView<
Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() {
return PayloadSizedByDivision::MaxSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericPayloadSizedByDivisionView<
Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() {
return PayloadSizedByDivision::MaxSizeInBytes();
}
namespace PayloadSizedByDivision {
inline constexpr ::std::int32_t MinSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL))
.ValueOrDefault();
}
} // namespace PayloadSizedByDivision
template <class Storage>
inline constexpr ::std::int32_t GenericPayloadSizedByDivisionView<
Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() {
return PayloadSizedByDivision::MinSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericPayloadSizedByDivisionView<
Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() {
return PayloadSizedByDivision::MinSizeInBytes();
}
namespace FieldGatedByDivision {} // namespace FieldGatedByDivision
template <class Storage>
inline typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
8>>
GenericFieldGatedByDivisionView<Storage>::divisor() const {
if (has_divisor().ValueOr(false)) {
auto emboss_reserved_local_size =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL));
auto emboss_reserved_local_offset =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL));
if (emboss_reserved_local_size.Known() &&
emboss_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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
8>>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericFieldGatedByDivisionView<Storage>::has_divisor() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 1>>,
8>>
GenericFieldGatedByDivisionView<Storage>::gated() const {
if (has_gated().ValueOr(false)) {
auto emboss_reserved_local_size =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL));
auto emboss_reserved_local_offset =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL));
if (emboss_reserved_local_size.Known() &&
emboss_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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 1>>,
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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 1>>,
8>>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericFieldGatedByDivisionView<Storage>::has_gated() const {
return ::emboss::support::Equal</**/ ::std::int32_t, bool, ::std::int32_t,
::std::int32_t>(
::emboss::support::FlooringQuotient</**/ ::std::int32_t, ::std::int32_t,
::std::int32_t, ::std::int32_t>(
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(12LL)),
(divisor().Ok() ? ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(
divisor().UncheckedRead()))
: ::emboss::support::Maybe</**/ ::std::int32_t>())),
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(3LL)));
}
template <class Storage>
inline typename GenericFieldGatedByDivisionView<
Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView
GenericFieldGatedByDivisionView<Storage>::IntrinsicSizeInBytes() const {
return typename GenericFieldGatedByDivisionView<
Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView(*this);
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericFieldGatedByDivisionView<Storage>::has_IntrinsicSizeInBytes() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
namespace FieldGatedByDivision {
inline constexpr ::std::int32_t MaxSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(2LL))
.ValueOrDefault();
}
} // namespace FieldGatedByDivision
template <class Storage>
inline constexpr ::std::int32_t GenericFieldGatedByDivisionView<
Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() {
return FieldGatedByDivision::MaxSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericFieldGatedByDivisionView<
Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() {
return FieldGatedByDivision::MaxSizeInBytes();
}
namespace FieldGatedByDivision {
inline constexpr ::std::int32_t MinSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL))
.ValueOrDefault();
}
} // namespace FieldGatedByDivision
template <class Storage>
inline constexpr ::std::int32_t GenericFieldGatedByDivisionView<
Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() {
return FieldGatedByDivision::MinSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericFieldGatedByDivisionView<
Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() {
return FieldGatedByDivision::MinSizeInBytes();
}
namespace CollapsingQuotient {} // namespace CollapsingQuotient
template <class Storage>
inline typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<
8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
8>>
GenericCollapsingQuotientView<Storage>::divisor() const {
if (has_divisor().ValueOr(false)) {
auto emboss_reserved_local_size =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL));
auto emboss_reserved_local_offset =
::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(0LL));
if (emboss_reserved_local_size.Known() &&
emboss_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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
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<
/**/ ::emboss::support::LittleEndianByteOrderer<
typename Storage::template OffsetStorageType</**/ 0, 0>>,
8>>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericCollapsingQuotientView<Storage>::has_divisor() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
template <class Storage>
inline typename GenericCollapsingQuotientView<
Storage>::EmbossReservedVirtualZeroOrUndefinedView
GenericCollapsingQuotientView<Storage>::zero_or_undefined() const {
return typename GenericCollapsingQuotientView<
Storage>::EmbossReservedVirtualZeroOrUndefinedView(*this);
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericCollapsingQuotientView<Storage>::has_zero_or_undefined() const {
return ::emboss::support::Maybe</**/ bool>(true);
}
namespace CollapsingQuotient {
inline constexpr ::std::int32_t IntrinsicSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL))
.ValueOrDefault();
}
} // namespace CollapsingQuotient
template <class Storage>
inline constexpr ::std::int32_t GenericCollapsingQuotientView<
Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() {
return CollapsingQuotient::IntrinsicSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericCollapsingQuotientView<Storage>::
EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() {
return CollapsingQuotient::IntrinsicSizeInBytes();
}
namespace CollapsingQuotient {
inline constexpr ::std::int32_t MaxSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL))
.ValueOrDefault();
}
} // namespace CollapsingQuotient
template <class Storage>
inline constexpr ::std::int32_t GenericCollapsingQuotientView<
Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() {
return CollapsingQuotient::MaxSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericCollapsingQuotientView<
Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() {
return CollapsingQuotient::MaxSizeInBytes();
}
namespace CollapsingQuotient {
inline constexpr ::std::int32_t MinSizeInBytes() {
return ::emboss::support::Maybe</**/ ::std::int32_t>(
static_cast</**/ ::std::int32_t>(1LL))
.ValueOrDefault();
}
} // namespace CollapsingQuotient
template <class Storage>
inline constexpr ::std::int32_t GenericCollapsingQuotientView<
Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() {
return CollapsingQuotient::MinSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t GenericCollapsingQuotientView<
Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() {
return CollapsingQuotient::MinSizeInBytes();
}
} // namespace test
} // namespace emboss
/* NOLINTEND */
#endif // TESTDATA_DIVISION_MODULUS_EMB_H_