text: // mojo/public/interfaces/bindings/tests/echo_import/echo_import.mojom-shared.h is auto generated by mojom_bindings_generator.py, do not edit
  
  // Copyright 2016 The Chromium Authors. All rights reserved.
  // Use of this source code is governed by a BSD-style license that can be
  // found in the LICENSE file.
  
  #ifndef MOJO_PUBLIC_INTERFACES_BINDINGS_TESTS_ECHO_IMPORT_ECHO_IMPORT_MOJOM_SHARED_H_
  #define MOJO_PUBLIC_INTERFACES_BINDINGS_TESTS_ECHO_IMPORT_ECHO_IMPORT_MOJOM_SHARED_H_
  
  #include <stdint.h>
  
  #include <functional>
  #include <ostream>
  #include <type_traits>
  #include <utility>
  
  #include "base/compiler_specific.h"
  #include "base/containers/flat_map.h"
  #include "mojo/public/cpp/bindings/array_data_view.h"
  #include "mojo/public/cpp/bindings/enum_traits.h"
  #include "mojo/public/cpp/bindings/interface_data_view.h"
  #include "mojo/public/cpp/bindings/lib/bindings_internal.h"
  #include "mojo/public/cpp/bindings/lib/serialization.h"
  #include "mojo/public/cpp/bindings/map_data_view.h"
  #include "mojo/public/cpp/bindings/string_data_view.h"
  #include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h"
  #include "mojo/public/interfaces/bindings/tests/echo_import/echo_import.mojom-shared-internal.h"
  
  
  
  
  #ifdef KYTHE_IS_RUNNING
  #pragma kythe_inline_metadata "Metadata comment"
  #endif
  
  
  namespace test {
  namespace echo_import {
  namespace mojom {
  class PointDataView;
  
  
  
  }  // namespace mojom
  }  // namespace echo_import
  }  // namespace test
  
  namespace mojo {
  namespace internal {
  
  template <>
  struct MojomTypeTraits<::test::echo_import::mojom::PointDataView> {
    using Data = ::test::echo_import::mojom::internal::Point_Data;
    using DataAsArrayElement = Pointer<Data>;
    static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct;
  };
  
  }  // namespace internal
  }  // namespace mojo
  
  
  namespace test {
  namespace echo_import {
  namespace mojom {
  
  
  class PointDataView {
   public:
    PointDataView() {}
  
    PointDataView(
        internal::Point_Data* data,
        mojo::Message* message)
        : data_(data) {}
  
    bool is_null() const { return !data_; }
    int32_t x() const {
      return data_->x;
    }
    int32_t y() const {
      return data_->y;
    }
   private:
    internal::Point_Data* data_ = nullptr;
  };
  
  
  
  }  // namespace mojom
  }  // namespace echo_import
  }  // namespace test
  
  namespace std {
  
  }  // namespace std
  
  namespace mojo {
  
  
  namespace internal {
  
  template <typename MaybeConstUserType>
  struct Serializer<::test::echo_import::mojom::PointDataView, MaybeConstUserType> {
    using UserType = typename std::remove_const<MaybeConstUserType>::type;
    using Traits = StructTraits<::test::echo_import::mojom::PointDataView, UserType>;
  
    static void Serialize(
        MaybeConstUserType& input,
        mojo::internal::MessageFragment<::test::echo_import::mojom::internal::Point_Data>& fragment) {
      if (CallIsNullIfExists<Traits>(input))
        return;
      fragment.Allocate();
      fragment->x = Traits::x(input);
      fragment->y = Traits::y(input);
    }
  
    static bool Deserialize(::test::echo_import::mojom::internal::Point_Data* input,
                            UserType* output,
                            Message* message) {
      if (!input)
        return CallSetToNullIfExists<Traits>(output);
  
      ::test::echo_import::mojom::PointDataView data_view(input, message);
      return Traits::Read(data_view, output);
    }
  };
  
  }  // namespace internal
  
  }  // namespace mojo
  
  
  namespace test {
  namespace echo_import {
  namespace mojom {
  
  
  
  
  }  // namespace mojom
  }  // namespace echo_import
  }  // namespace test
  
  // Declare TraceFormatTraits for enums, which should be defined in ::perfetto
  // namespace.
  
  #endif  // MOJO_PUBLIC_INTERFACES_BINDINGS_TESTS_ECHO_IMPORT_ECHO_IMPORT_MOJOM_SHARED_H_
  
  /* Metadata comment
  eyJtZXRhIjogW10sICJ0eXBlIjogImt5dGhlMCJ9
  */