blob: d6db7038a960a85ad074a7661c04fb5269dc41b5 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
// fidl_experiment = output_index_json
#pragma once
#include <fidl/test.vectors/cpp/common_types.h>
#include <fidl/test.vectors/cpp/markers.h>
#include <lib/fidl/cpp/natural_coding_traits.h>
#include <lib/fidl/cpp/natural_types.h>
#include <cinttypes>
#include <string>
#ifdef __Fuchsia__
#endif // __Fuchsia__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
namespace test_vectors {
class ExampleUseOfVectors;
class ExampleUseOfVectors {
private:
struct Storage_;
public:
ExampleUseOfVectors(Storage_ storage) noexcept;
ExampleUseOfVectors(::std::vector<uint8_t> vector_of_uint8, ::std::vector<::std::vector<bool>> vector_of_vector_of_bool) noexcept;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
// Default constructs a |ExampleUseOfVectors| only if all of its members are default constructible.
ExampleUseOfVectors() = default;
#pragma clang diagnostic pop
ExampleUseOfVectors(ExampleUseOfVectors&&) noexcept = default;
ExampleUseOfVectors& operator=(ExampleUseOfVectors&&) noexcept = default;
ExampleUseOfVectors(const ExampleUseOfVectors& other) noexcept;
ExampleUseOfVectors& operator=(const ExampleUseOfVectors& other) noexcept;
bool operator==(const ExampleUseOfVectors& other) const noexcept {
return ::fidl::internal::NaturalStructCodingTraits<::test_vectors::ExampleUseOfVectors, 32>::Equal(this, &other);
}
bool operator!=(const ExampleUseOfVectors& other) const noexcept {
return !::fidl::internal::NaturalStructCodingTraits<::test_vectors::ExampleUseOfVectors, 32>::Equal(this, &other);
}
const ::std::vector<uint8_t>&
vector_of_uint8() const {
return storage_.vector_of_uint8;
}
::std::vector<uint8_t>& vector_of_uint8() {
return storage_.vector_of_uint8;
}
// Setter for vector_of_uint8.
//
ExampleUseOfVectors& vector_of_uint8(::std::vector<uint8_t> value);
const ::std::vector<::std::vector<bool>>&
vector_of_vector_of_bool() const {
return storage_.vector_of_vector_of_bool;
}
::std::vector<::std::vector<bool>>& vector_of_vector_of_bool() {
return storage_.vector_of_vector_of_bool;
}
// Setter for vector_of_vector_of_bool.
//
ExampleUseOfVectors& vector_of_vector_of_bool(::std::vector<::std::vector<bool>> value);
ExampleUseOfVectors(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag);
private:
struct Storage_ final {
::std::vector<uint8_t> vector_of_uint8;
::std::vector<::std::vector<bool>> vector_of_vector_of_bool;
};
Storage_ storage_;
Storage_ CloneStorage_() const;
friend struct ::fidl::internal::NaturalStructCodingTraits<::test_vectors::ExampleUseOfVectors, 32>;
friend struct ::fidl::internal::MemberVisitor<::test_vectors::ExampleUseOfVectors>;
static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalStructMember<Storage_, ::std::vector<uint8_t>, fidl::internal::NaturalCodingConstraintVector<fidl::internal::NaturalCodingConstraintEmpty>>{
&Storage_::vector_of_uint8, 0},
::fidl::internal::NaturalStructMember<Storage_, ::std::vector<::std::vector<bool>>, fidl::internal::NaturalCodingConstraintVector<fidl::internal::NaturalCodingConstraintVector<fidl::internal::NaturalCodingConstraintEmpty>>>{&Storage_::vector_of_vector_of_bool, 16});
static constexpr auto kPadding = std::make_tuple();
};
inline ExampleUseOfVectors::ExampleUseOfVectors(Storage_ storage) noexcept : storage_(std::move(storage)) {}
inline ExampleUseOfVectors::ExampleUseOfVectors(::std::vector<uint8_t> vector_of_uint8, ::std::vector<::std::vector<bool>> vector_of_vector_of_bool) noexcept
: storage_({.vector_of_uint8 = std::move(vector_of_uint8),
.vector_of_vector_of_bool = std::move(vector_of_vector_of_bool)}) {}
inline ExampleUseOfVectors::ExampleUseOfVectors(const ::test_vectors::ExampleUseOfVectors& other) noexcept : ::test_vectors::ExampleUseOfVectors(other.CloneStorage_()) {}
inline ExampleUseOfVectors& ::test_vectors::ExampleUseOfVectors::operator=(const ::test_vectors::ExampleUseOfVectors & other) noexcept {
storage_ = other.CloneStorage_();
return *this;
}
inline ExampleUseOfVectors::ExampleUseOfVectors(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : ExampleUseOfVectors(Storage_{
.vector_of_uint8 = {},
.vector_of_vector_of_bool = {},
}) {}
inline ExampleUseOfVectors& ExampleUseOfVectors::vector_of_uint8(::std::vector<uint8_t> value) {
storage_.vector_of_uint8 = std::move(value);
return *this;
}
inline ExampleUseOfVectors& ExampleUseOfVectors::vector_of_vector_of_bool(::std::vector<::std::vector<bool>> value) {
storage_.vector_of_vector_of_bool = std::move(value);
return *this;
}
} // namespace test_vectors
namespace fidl {
template <>
struct IsFidlType<::test_vectors::ExampleUseOfVectors> : public std::true_type {};
template <>
struct TypeTraits<::test_vectors::ExampleUseOfVectors> {
static constexpr uint32_t kMaxNumHandles = 0;
static constexpr uint32_t kMaxDepth = 2;
static constexpr uint32_t kPrimarySize = 32;
static constexpr uint32_t kMaxOutOfLine = 4294967295;
static constexpr bool kHasPointer = true;
};
template <>
struct IsStruct<::test_vectors::ExampleUseOfVectors> : public std::true_type {};
template <>
struct internal::NaturalCodingTraits<::test_vectors::ExampleUseOfVectors, ::fidl::internal::NaturalCodingConstraintEmpty> final
: public ::fidl::internal::NaturalStructCodingTraits<::test_vectors::ExampleUseOfVectors, 32> {};
#pragma clang diagnostic pop
} // namespace fidl