// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__type_support.cpp.em
// with input from unique_identifier_msgs:msg/UUID.idl
// generated code does not contain a copyright notice
#include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_fastrtps_cpp.hpp"
#include "unique_identifier_msgs/msg/detail/uuid__struct.hpp"

#include <limits>
#include <stdexcept>
#include <string>
#include "rosidl_typesupport_cpp/message_type_support.hpp"
#include "rosidl_typesupport_fastrtps_cpp/identifier.hpp"
#include "rosidl_typesupport_fastrtps_cpp/message_type_support.h"
#include "rosidl_typesupport_fastrtps_cpp/message_type_support_decl.hpp"
#include "rosidl_typesupport_fastrtps_cpp/wstring_conversion.hpp"
#include "fastcdr/Cdr.h"


// forward declaration of message dependencies and their conversion functions

namespace unique_identifier_msgs
{

namespace msg
{

namespace typesupport_fastrtps_cpp
{

bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unique_identifier_msgs
cdr_serialize(
  const unique_identifier_msgs::msg::UUID & ros_message,
  eprosima::fastcdr::Cdr & cdr)
{
  // Member: uuid
  {
    cdr << ros_message.uuid;
  }
  return true;
}

bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unique_identifier_msgs
cdr_deserialize(
  eprosima::fastcdr::Cdr & cdr,
  unique_identifier_msgs::msg::UUID & ros_message)
{
  // Member: uuid
  {
    cdr >> ros_message.uuid;
  }

  return true;
}

size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unique_identifier_msgs
get_serialized_size(
  const unique_identifier_msgs::msg::UUID & ros_message,
  size_t current_alignment)
{
  size_t initial_alignment = current_alignment;

  const size_t padding = 4;
  const size_t wchar_size = 4;
  (void)padding;
  (void)wchar_size;

  // Member: uuid
  {
    size_t array_size = 16;
    size_t item_size = sizeof(ros_message.uuid[0]);
    current_alignment += array_size * item_size +
      eprosima::fastcdr::Cdr::alignment(current_alignment, item_size);
  }

  return current_alignment - initial_alignment;
}

size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unique_identifier_msgs
max_serialized_size_UUID(
  bool & full_bounded,
  bool & is_plain,
  size_t current_alignment)
{
  size_t initial_alignment = current_alignment;

  const size_t padding = 4;
  const size_t wchar_size = 4;
  (void)padding;
  (void)wchar_size;

  full_bounded = true;
  is_plain = true;


  // Member: uuid
  {
    size_t array_size = 16;

    current_alignment += array_size * sizeof(uint8_t);
  }

  return current_alignment - initial_alignment;
}

static bool _UUID__cdr_serialize(
  const void * untyped_ros_message,
  eprosima::fastcdr::Cdr & cdr)
{
  auto typed_message =
    static_cast<const unique_identifier_msgs::msg::UUID *>(
    untyped_ros_message);
  return cdr_serialize(*typed_message, cdr);
}

static bool _UUID__cdr_deserialize(
  eprosima::fastcdr::Cdr & cdr,
  void * untyped_ros_message)
{
  auto typed_message =
    static_cast<unique_identifier_msgs::msg::UUID *>(
    untyped_ros_message);
  return cdr_deserialize(cdr, *typed_message);
}

static uint32_t _UUID__get_serialized_size(
  const void * untyped_ros_message)
{
  auto typed_message =
    static_cast<const unique_identifier_msgs::msg::UUID *>(
    untyped_ros_message);
  return static_cast<uint32_t>(get_serialized_size(*typed_message, 0));
}

static size_t _UUID__max_serialized_size(char & bounds_info)
{
  bool full_bounded;
  bool is_plain;
  size_t ret_val;

  ret_val = max_serialized_size_UUID(full_bounded, is_plain, 0);

  bounds_info =
    is_plain ? ROSIDL_TYPESUPPORT_FASTRTPS_PLAIN_TYPE :
    full_bounded ? ROSIDL_TYPESUPPORT_FASTRTPS_BOUNDED_TYPE : ROSIDL_TYPESUPPORT_FASTRTPS_UNBOUNDED_TYPE;
  return ret_val;
}

static message_type_support_callbacks_t _UUID__callbacks = {
  "unique_identifier_msgs::msg",
  "UUID",
  _UUID__cdr_serialize,
  _UUID__cdr_deserialize,
  _UUID__get_serialized_size,
  _UUID__max_serialized_size
};

static rosidl_message_type_support_t _UUID__handle = {
  rosidl_typesupport_fastrtps_cpp::typesupport_identifier,
  &_UUID__callbacks,
  get_message_typesupport_handle_function,
};

}  // namespace typesupport_fastrtps_cpp

}  // namespace msg

}  // namespace unique_identifier_msgs

namespace rosidl_typesupport_fastrtps_cpp
{

template<>
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_unique_identifier_msgs
const rosidl_message_type_support_t *
get_message_type_support_handle<unique_identifier_msgs::msg::UUID>()
{
  return &unique_identifier_msgs::msg::typesupport_fastrtps_cpp::_UUID__handle;
}

}  // namespace rosidl_typesupport_fastrtps_cpp

#ifdef __cplusplus
extern "C"
{
#endif

const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unique_identifier_msgs, msg, UUID)() {
  return &unique_identifier_msgs::msg::typesupport_fastrtps_cpp::_UUID__handle;
}

#ifdef __cplusplus
}
#endif
