blob: 624c9548a818daecb24e20c1a04c65a384663f0e [file] [log] [blame]
/**
* Generated by the Emboss compiler. DO NOT EDIT!
*/
#ifndef TESTDATA_NEXT_KEYWORD_EMB_H_
#define TESTDATA_NEXT_KEYWORD_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_prelude.h"
#include "runtime/cpp/emboss_enum_view.h"
#include "runtime/cpp/emboss_text_util.h"
/* NOLINTBEGIN */
namespace emboss {
namespace test {
namespace NextKeyword {
} // namespace NextKeyword
template <class Storage>
class GenericNextKeywordView;
namespace NextKeyword {
} // namespace NextKeyword
template <class View>
struct EmbossReservedInternalIsGenericNextKeywordView;
template <class Storage>
class GenericNextKeywordView final {
public:
GenericNextKeywordView() : backing_() {}
explicit GenericNextKeywordView(
Storage emboss_reserved_local_bytes)
: backing_(emboss_reserved_local_bytes)
{}
template <typename OtherStorage>
GenericNextKeywordView(
const GenericNextKeywordView<OtherStorage> &emboss_reserved_local_other)
: backing_{emboss_reserved_local_other.BackingStorage()}
{}
template <typename Arg,
typename = typename ::std::enable_if<
!EmbossReservedInternalIsGenericNextKeywordView<
typename ::std::remove_cv<typename ::std::remove_reference<
Arg>::type>::type>::value>::type>
explicit GenericNextKeywordView(
Arg &&emboss_reserved_local_arg)
: backing_(::std::forward<Arg>(
emboss_reserved_local_arg))
{}
template <typename Arg0, typename Arg1, typename... Args>
explicit GenericNextKeywordView(
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>
GenericNextKeywordView<Storage> &operator=(
const GenericNextKeywordView<OtherStorage> &emboss_reserved_local_other) {
backing_ = emboss_reserved_local_other.BackingStorage();
return *this;
}
bool Ok() const {
if (!IsComplete()) return false;
if (!has_value32().Known()) return false;
if (has_value32().ValueOrDefault() && !value32().Ok()) return false;
if (!has_value16().Known()) return false;
if (has_value16().ValueOrDefault() && !value16().Ok()) return false;
if (!has_value8().Known()) return false;
if (has_value8().ValueOrDefault() && !value8().Ok()) return false;
if (!has_value8_offset().Known()) return false;
if (has_value8_offset().ValueOrDefault() && !value8_offset().Ok()) return false;
if (!has_IntrinsicSizeInBytes().Known()) return false;
if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false;
if (!has_MaxSizeInBytes().Known()) return false;
if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false;
if (!has_MinSizeInBytes().Known()) return false;
if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false;
return true;
}
Storage BackingStorage() const { return backing_; }
bool IsComplete() const {
return backing_.Ok() && IntrinsicSizeInBytes().Ok() &&
backing_.SizeInBytes() >=
static_cast</**/ ::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(
GenericNextKeywordView<OtherStorage> emboss_reserved_local_other) const {
if (!has_value32().Known()) return false;
if (!emboss_reserved_local_other.has_value32().Known()) return false;
if (emboss_reserved_local_other.has_value32().ValueOrDefault() &&
!has_value32().ValueOrDefault())
return false;
if (has_value32().ValueOrDefault() &&
!emboss_reserved_local_other.has_value32().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_value32().ValueOrDefault() &&
has_value32().ValueOrDefault() &&
!value32().Equals(emboss_reserved_local_other.value32()))
return false;
if (!has_value16().Known()) return false;
if (!emboss_reserved_local_other.has_value16().Known()) return false;
if (emboss_reserved_local_other.has_value16().ValueOrDefault() &&
!has_value16().ValueOrDefault())
return false;
if (has_value16().ValueOrDefault() &&
!emboss_reserved_local_other.has_value16().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_value16().ValueOrDefault() &&
has_value16().ValueOrDefault() &&
!value16().Equals(emboss_reserved_local_other.value16()))
return false;
if (!has_value8().Known()) return false;
if (!emboss_reserved_local_other.has_value8().Known()) return false;
if (emboss_reserved_local_other.has_value8().ValueOrDefault() &&
!has_value8().ValueOrDefault())
return false;
if (has_value8().ValueOrDefault() &&
!emboss_reserved_local_other.has_value8().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_value8().ValueOrDefault() &&
has_value8().ValueOrDefault() &&
!value8().Equals(emboss_reserved_local_other.value8()))
return false;
if (!has_value8_offset().Known()) return false;
if (!emboss_reserved_local_other.has_value8_offset().Known()) return false;
if (emboss_reserved_local_other.has_value8_offset().ValueOrDefault() &&
!has_value8_offset().ValueOrDefault())
return false;
if (has_value8_offset().ValueOrDefault() &&
!emboss_reserved_local_other.has_value8_offset().ValueOrDefault())
return false;
if (emboss_reserved_local_other.has_value8_offset().ValueOrDefault() &&
has_value8_offset().ValueOrDefault() &&
!value8_offset().Equals(emboss_reserved_local_other.value8_offset()))
return false;
return true;
}
template <typename OtherStorage>
bool UncheckedEquals(
GenericNextKeywordView<OtherStorage> emboss_reserved_local_other) const {
if (emboss_reserved_local_other.has_value32().ValueOr(false) &&
!has_value32().ValueOr(false))
return false;
if (has_value32().ValueOr(false) &&
!emboss_reserved_local_other.has_value32().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_value32().ValueOr(false) &&
has_value32().ValueOr(false) &&
!value32().UncheckedEquals(emboss_reserved_local_other.value32()))
return false;
if (emboss_reserved_local_other.has_value16().ValueOr(false) &&
!has_value16().ValueOr(false))
return false;
if (has_value16().ValueOr(false) &&
!emboss_reserved_local_other.has_value16().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_value16().ValueOr(false) &&
has_value16().ValueOr(false) &&
!value16().UncheckedEquals(emboss_reserved_local_other.value16()))
return false;
if (emboss_reserved_local_other.has_value8().ValueOr(false) &&
!has_value8().ValueOr(false))
return false;
if (has_value8().ValueOr(false) &&
!emboss_reserved_local_other.has_value8().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_value8().ValueOr(false) &&
has_value8().ValueOr(false) &&
!value8().UncheckedEquals(emboss_reserved_local_other.value8()))
return false;
if (emboss_reserved_local_other.has_value8_offset().ValueOr(false) &&
!has_value8_offset().ValueOr(false))
return false;
if (has_value8_offset().ValueOr(false) &&
!emboss_reserved_local_other.has_value8_offset().ValueOr(false))
return false;
if (emboss_reserved_local_other.has_value8_offset().ValueOr(false) &&
has_value8_offset().ValueOr(false) &&
!value8_offset().UncheckedEquals(emboss_reserved_local_other.value8_offset()))
return false;
return true;
}
template <typename OtherStorage>
void UncheckedCopyFrom(
GenericNextKeywordView<OtherStorage> emboss_reserved_local_other) const {
backing_.UncheckedCopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead());
}
template <typename OtherStorage>
void CopyFrom(
GenericNextKeywordView<OtherStorage> emboss_reserved_local_other) const {
backing_.CopyFrom(
emboss_reserved_local_other.BackingStorage(),
emboss_reserved_local_other.IntrinsicSizeInBytes().Read());
}
template <typename OtherStorage>
bool TryToCopyFrom(
GenericNextKeywordView<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 == "value32") {
if (!value32().UpdateFromTextStream(
emboss_reserved_local_stream)) {
return false;
}
continue;
}
if (emboss_reserved_local_name == "value16") {
if (!value16().UpdateFromTextStream(
emboss_reserved_local_stream)) {
return false;
}
continue;
}
if (emboss_reserved_local_name == "value8") {
if (!value8().UpdateFromTextStream(
emboss_reserved_local_stream)) {
return false;
}
continue;
}
if (emboss_reserved_local_name == "value8_offset") {
if (!value8_offset().UpdateFromTextStream(
emboss_reserved_local_stream)) {
return false;
}
continue;
}
return false;
}
}
template <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_value32().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
value32().IsAggregate() || value32().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
} else {
if (emboss_reserved_local_wrote_field) {
emboss_reserved_local_stream->Write(",");
}
emboss_reserved_local_stream->Write(" ");
}
emboss_reserved_local_stream->Write("value32: ");
value32().WriteToTextStream(emboss_reserved_local_stream,
emboss_reserved_local_field_options);
emboss_reserved_local_wrote_field = true;
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write("\n");
}
} else if (emboss_reserved_local_field_options.allow_partial_output() &&
emboss_reserved_local_field_options.comments() &&
!value32().IsAggregate() && !value32().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
}
emboss_reserved_local_stream->Write("# value32: UNREADABLE\n");
}
}
if (has_value16().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
value16().IsAggregate() || value16().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
} else {
if (emboss_reserved_local_wrote_field) {
emboss_reserved_local_stream->Write(",");
}
emboss_reserved_local_stream->Write(" ");
}
emboss_reserved_local_stream->Write("value16: ");
value16().WriteToTextStream(emboss_reserved_local_stream,
emboss_reserved_local_field_options);
emboss_reserved_local_wrote_field = true;
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write("\n");
}
} else if (emboss_reserved_local_field_options.allow_partial_output() &&
emboss_reserved_local_field_options.comments() &&
!value16().IsAggregate() && !value16().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
}
emboss_reserved_local_stream->Write("# value16: UNREADABLE\n");
}
}
if (has_value8().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
value8().IsAggregate() || value8().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
} else {
if (emboss_reserved_local_wrote_field) {
emboss_reserved_local_stream->Write(",");
}
emboss_reserved_local_stream->Write(" ");
}
emboss_reserved_local_stream->Write("value8: ");
value8().WriteToTextStream(emboss_reserved_local_stream,
emboss_reserved_local_field_options);
emboss_reserved_local_wrote_field = true;
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write("\n");
}
} else if (emboss_reserved_local_field_options.allow_partial_output() &&
emboss_reserved_local_field_options.comments() &&
!value8().IsAggregate() && !value8().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
}
emboss_reserved_local_stream->Write("# value8: UNREADABLE\n");
}
}
if (has_value8_offset().ValueOr(false)) {
if (!emboss_reserved_local_field_options.allow_partial_output() ||
value8_offset().IsAggregate() || value8_offset().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
} else {
if (emboss_reserved_local_wrote_field) {
emboss_reserved_local_stream->Write(",");
}
emboss_reserved_local_stream->Write(" ");
}
emboss_reserved_local_stream->Write("value8_offset: ");
value8_offset().WriteToTextStream(emboss_reserved_local_stream,
emboss_reserved_local_field_options);
emboss_reserved_local_wrote_field = true;
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write("\n");
}
} else if (emboss_reserved_local_field_options.allow_partial_output() &&
emboss_reserved_local_field_options.comments() &&
!value8_offset().IsAggregate() && !value8_offset().Ok()) {
if (emboss_reserved_local_field_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_field_options.current_indent());
}
emboss_reserved_local_stream->Write("# value8_offset: UNREADABLE\n");
}
}
(void)emboss_reserved_local_wrote_field;
if (emboss_reserved_local_options.multiline()) {
emboss_reserved_local_stream->Write(
emboss_reserved_local_options.current_indent());
emboss_reserved_local_stream->Write("}");
} else {
emboss_reserved_local_stream->Write(" }");
}
}
static constexpr bool IsAggregate() { return true; }
public:
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock</**/::emboss::support::LittleEndianByteOrderer<typename Storage::template OffsetStorageType</**/0, 0>>, 32>>
value32() const;
::emboss::support::Maybe<bool> has_value32() const;
public:
typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock</**/::emboss::support::LittleEndianByteOrderer<typename Storage::template OffsetStorageType</**/0, 4>>, 16>>
value16() const;
::emboss::support::Maybe<bool> has_value16() 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, 6>>, 8>>
value8() const;
::emboss::support::Maybe<bool> has_value8() 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, 10>>, 8>>
value8_offset() const;
::emboss::support::Maybe<bool> has_value8_offset() const;
public:
class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final {
public:
using ValueType = ::std::int32_t;
constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView() {}
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(const EmbossReservedDollarVirtualIntrinsicSizeInBytesView &) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView(EmbossReservedDollarVirtualIntrinsicSizeInBytesView &&) = default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView &operator=(const EmbossReservedDollarVirtualIntrinsicSizeInBytesView &) =
default;
EmbossReservedDollarVirtualIntrinsicSizeInBytesView &operator=(EmbossReservedDollarVirtualIntrinsicSizeInBytesView &&) =
default;
~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default;
static constexpr ::std::int32_t Read();
static constexpr ::std::int32_t UncheckedRead();
static constexpr bool Ok() { return true; }
template <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; }
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; }
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 GenericNextKeywordView;
};
using NextKeywordView =
GenericNextKeywordView</**/ ::emboss::support::ReadOnlyContiguousBuffer>;
using NextKeywordWriter =
GenericNextKeywordView</**/ ::emboss::support::ReadWriteContiguousBuffer>;
template <class View>
struct EmbossReservedInternalIsGenericNextKeywordView {
static constexpr const bool value = false;
};
template <class Storage>
struct EmbossReservedInternalIsGenericNextKeywordView<
GenericNextKeywordView<Storage>> {
static constexpr const bool value = true;
};
template <typename T>
inline GenericNextKeywordView<
/**/ ::emboss::support::ContiguousBuffer<
typename ::std::remove_reference<
decltype(*::std::declval<T>()->data())>::type,
1, 0>>
MakeNextKeywordView( T &&emboss_reserved_local_arg) {
return GenericNextKeywordView<
/**/ ::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 GenericNextKeywordView</**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>
MakeNextKeywordView( T *emboss_reserved_local_data,
::std::size_t emboss_reserved_local_size) {
return GenericNextKeywordView</**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>(
emboss_reserved_local_data,
emboss_reserved_local_size);
}
template <typename T, ::std::size_t kAlignment>
inline GenericNextKeywordView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>
MakeAlignedNextKeywordView(
T *emboss_reserved_local_data,
::std::size_t emboss_reserved_local_size) {
return GenericNextKeywordView<
/**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>(
emboss_reserved_local_data,
emboss_reserved_local_size);
}
namespace NextKeyword {
} // namespace NextKeyword
template <class Storage>
inline typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock</**/::emboss::support::LittleEndianByteOrderer<typename Storage::template OffsetStorageType</**/0, 0>>, 32>>
GenericNextKeywordView<Storage>::value32()
const {
if ( has_value32().ValueOr(false)) {
auto emboss_reserved_local_size = ::emboss::support::Maybe</**/::std::int32_t>(static_cast</**/::std::int32_t>(4LL));
auto emboss_reserved_local_offset = ::emboss::support::Maybe</**/::std::int32_t>(static_cast</**/::std::int32_t>(0LL));
if (emboss_reserved_local_size.Known() &&
emboss_reserved_local_size.ValueOr(0) >= 0 &&
emboss_reserved_local_offset.Known() &&
emboss_reserved_local_offset.ValueOr(0) >= 0) {
return ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock</**/::emboss::support::LittleEndianByteOrderer<typename Storage::template OffsetStorageType</**/0, 0>>, 32>>
(
backing_
.template GetOffsetStorage<0,
0>(
emboss_reserved_local_offset.ValueOrDefault(),
emboss_reserved_local_size.ValueOrDefault()));
}
}
return ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock</**/::emboss::support::LittleEndianByteOrderer<typename Storage::template OffsetStorageType</**/0, 0>>, 32>>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericNextKeywordView<Storage>::has_value32() const {
return ::emboss::support::Maybe</**/bool>(true);
}
template <class Storage>
inline typename ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock</**/::emboss::support::LittleEndianByteOrderer<typename Storage::template OffsetStorageType</**/0, 4>>, 16>>
GenericNextKeywordView<Storage>::value16()
const {
if ( has_value16().ValueOr(false)) {
auto emboss_reserved_local_size = ::emboss::support::Maybe</**/::std::int32_t>(static_cast</**/::std::int32_t>(2LL));
auto emboss_reserved_local_offset = ::emboss::support::Maybe</**/::std::int32_t>(static_cast</**/::std::int32_t>(4LL));
if (emboss_reserved_local_size.Known() &&
emboss_reserved_local_size.ValueOr(0) >= 0 &&
emboss_reserved_local_offset.Known() &&
emboss_reserved_local_offset.ValueOr(0) >= 0) {
return ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock</**/::emboss::support::LittleEndianByteOrderer<typename Storage::template OffsetStorageType</**/0, 4>>, 16>>
(
backing_
.template GetOffsetStorage<0,
4>(
emboss_reserved_local_offset.ValueOrDefault(),
emboss_reserved_local_size.ValueOrDefault()));
}
}
return ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock</**/::emboss::support::LittleEndianByteOrderer<typename Storage::template OffsetStorageType</**/0, 4>>, 16>>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericNextKeywordView<Storage>::has_value16() 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, 6>>, 8>>
GenericNextKeywordView<Storage>::value8()
const {
if ( has_value8().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>(6LL));
if (emboss_reserved_local_size.Known() &&
emboss_reserved_local_size.ValueOr(0) >= 0 &&
emboss_reserved_local_offset.Known() &&
emboss_reserved_local_offset.ValueOr(0) >= 0) {
return ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock</**/::emboss::support::LittleEndianByteOrderer<typename Storage::template OffsetStorageType</**/0, 6>>, 8>>
(
backing_
.template GetOffsetStorage<0,
6>(
emboss_reserved_local_offset.ValueOrDefault(),
emboss_reserved_local_size.ValueOrDefault()));
}
}
return ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock</**/::emboss::support::LittleEndianByteOrderer<typename Storage::template OffsetStorageType</**/0, 6>>, 8>>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericNextKeywordView<Storage>::has_value8() 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, 10>>, 8>>
GenericNextKeywordView<Storage>::value8_offset()
const {
if ( has_value8_offset().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>(10LL));
if (emboss_reserved_local_size.Known() &&
emboss_reserved_local_size.ValueOr(0) >= 0 &&
emboss_reserved_local_offset.Known() &&
emboss_reserved_local_offset.ValueOr(0) >= 0) {
return ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock</**/::emboss::support::LittleEndianByteOrderer<typename Storage::template OffsetStorageType</**/0, 10>>, 8>>
(
backing_
.template GetOffsetStorage<0,
10>(
emboss_reserved_local_offset.ValueOrDefault(),
emboss_reserved_local_size.ValueOrDefault()));
}
}
return ::emboss::prelude::UIntView<
/**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>,
typename ::emboss::support::BitBlock</**/::emboss::support::LittleEndianByteOrderer<typename Storage::template OffsetStorageType</**/0, 10>>, 8>>
();
}
template <class Storage>
inline ::emboss::support::Maybe<bool>
GenericNextKeywordView<Storage>::has_value8_offset() const {
return ::emboss::support::Maybe</**/bool>(true);
}
namespace NextKeyword {
inline constexpr ::std::int32_t IntrinsicSizeInBytes() {
return ::emboss::support::Maybe</**/::std::int32_t>(static_cast</**/::std::int32_t>(11LL)).ValueOrDefault();
}
} // namespace NextKeyword
template <class Storage>
inline constexpr ::std::int32_t
GenericNextKeywordView<Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() {
return NextKeyword::IntrinsicSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t
GenericNextKeywordView<
Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() {
return NextKeyword::IntrinsicSizeInBytes();
}
namespace NextKeyword {
inline constexpr ::std::int32_t MaxSizeInBytes() {
return ::emboss::support::Maybe</**/::std::int32_t>(static_cast</**/::std::int32_t>(11LL)).ValueOrDefault();
}
} // namespace NextKeyword
template <class Storage>
inline constexpr ::std::int32_t
GenericNextKeywordView<Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() {
return NextKeyword::MaxSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t
GenericNextKeywordView<
Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() {
return NextKeyword::MaxSizeInBytes();
}
namespace NextKeyword {
inline constexpr ::std::int32_t MinSizeInBytes() {
return ::emboss::support::Maybe</**/::std::int32_t>(static_cast</**/::std::int32_t>(11LL)).ValueOrDefault();
}
} // namespace NextKeyword
template <class Storage>
inline constexpr ::std::int32_t
GenericNextKeywordView<Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() {
return NextKeyword::MinSizeInBytes();
}
template <class Storage>
inline constexpr ::std::int32_t
GenericNextKeywordView<
Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() {
return NextKeyword::MinSizeInBytes();
}
} // namespace test
} // namespace emboss
/* NOLINTEND */
#endif // TESTDATA_NEXT_KEYWORD_EMB_H_