|
// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em
|
|
// with input from turtle_interfaces:msg/TurtleMsg.idl
|
|
// generated code does not contain a copyright notice
|
|
|
|
#ifndef TURTLE_INTERFACES__MSG__DETAIL__TURTLE_MSG__STRUCT_HPP_
|
|
#define TURTLE_INTERFACES__MSG__DETAIL__TURTLE_MSG__STRUCT_HPP_
|
|
|
|
#include <rosidl_runtime_cpp/bounded_vector.hpp>
|
|
#include <rosidl_runtime_cpp/message_initialization.hpp>
|
|
#include <algorithm>
|
|
#include <array>
|
|
#include <memory>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
|
|
// Include directives for member types
|
|
// Member 'turtle_pose'
|
|
#include "geometry_msgs/msg/detail/pose__struct.hpp"
|
|
|
|
#ifndef _WIN32
|
|
# define DEPRECATED__turtle_interfaces__msg__TurtleMsg __attribute__((deprecated))
|
|
#else
|
|
# define DEPRECATED__turtle_interfaces__msg__TurtleMsg __declspec(deprecated)
|
|
#endif
|
|
|
|
namespace turtle_interfaces
|
|
{
|
|
|
|
namespace msg
|
|
{
|
|
|
|
// message struct
|
|
template<class ContainerAllocator>
|
|
struct TurtleMsg_
|
|
{
|
|
using Type = TurtleMsg_<ContainerAllocator>;
|
|
|
|
explicit TurtleMsg_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL)
|
|
: turtle_pose(_init)
|
|
{
|
|
if (rosidl_runtime_cpp::MessageInitialization::ALL == _init ||
|
|
rosidl_runtime_cpp::MessageInitialization::ZERO == _init)
|
|
{
|
|
this->name = "";
|
|
this->color = "";
|
|
}
|
|
}
|
|
|
|
explicit TurtleMsg_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL)
|
|
: name(_alloc),
|
|
turtle_pose(_alloc, _init),
|
|
color(_alloc)
|
|
{
|
|
if (rosidl_runtime_cpp::MessageInitialization::ALL == _init ||
|
|
rosidl_runtime_cpp::MessageInitialization::ZERO == _init)
|
|
{
|
|
this->name = "";
|
|
this->color = "";
|
|
}
|
|
}
|
|
|
|
// field types and members
|
|
using _name_type =
|
|
std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other>;
|
|
_name_type name;
|
|
using _turtle_pose_type =
|
|
geometry_msgs::msg::Pose_<ContainerAllocator>;
|
|
_turtle_pose_type turtle_pose;
|
|
using _color_type =
|
|
std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other>;
|
|
_color_type color;
|
|
|
|
// setters for named parameter idiom
|
|
Type & set__name(
|
|
const std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other> & _arg)
|
|
{
|
|
this->name = _arg;
|
|
return *this;
|
|
}
|
|
Type & set__turtle_pose(
|
|
const geometry_msgs::msg::Pose_<ContainerAllocator> & _arg)
|
|
{
|
|
this->turtle_pose = _arg;
|
|
return *this;
|
|
}
|
|
Type & set__color(
|
|
const std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other> & _arg)
|
|
{
|
|
this->color = _arg;
|
|
return *this;
|
|
}
|
|
|
|
// constant declarations
|
|
|
|
// pointer types
|
|
using RawPtr =
|
|
turtle_interfaces::msg::TurtleMsg_<ContainerAllocator> *;
|
|
using ConstRawPtr =
|
|
const turtle_interfaces::msg::TurtleMsg_<ContainerAllocator> *;
|
|
using SharedPtr =
|
|
std::shared_ptr<turtle_interfaces::msg::TurtleMsg_<ContainerAllocator>>;
|
|
using ConstSharedPtr =
|
|
std::shared_ptr<turtle_interfaces::msg::TurtleMsg_<ContainerAllocator> const>;
|
|
|
|
template<typename Deleter = std::default_delete<
|
|
turtle_interfaces::msg::TurtleMsg_<ContainerAllocator>>>
|
|
using UniquePtrWithDeleter =
|
|
std::unique_ptr<turtle_interfaces::msg::TurtleMsg_<ContainerAllocator>, Deleter>;
|
|
|
|
using UniquePtr = UniquePtrWithDeleter<>;
|
|
|
|
template<typename Deleter = std::default_delete<
|
|
turtle_interfaces::msg::TurtleMsg_<ContainerAllocator>>>
|
|
using ConstUniquePtrWithDeleter =
|
|
std::unique_ptr<turtle_interfaces::msg::TurtleMsg_<ContainerAllocator> const, Deleter>;
|
|
using ConstUniquePtr = ConstUniquePtrWithDeleter<>;
|
|
|
|
using WeakPtr =
|
|
std::weak_ptr<turtle_interfaces::msg::TurtleMsg_<ContainerAllocator>>;
|
|
using ConstWeakPtr =
|
|
std::weak_ptr<turtle_interfaces::msg::TurtleMsg_<ContainerAllocator> const>;
|
|
|
|
// pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead
|
|
// NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly
|
|
typedef DEPRECATED__turtle_interfaces__msg__TurtleMsg
|
|
std::shared_ptr<turtle_interfaces::msg::TurtleMsg_<ContainerAllocator>>
|
|
Ptr;
|
|
typedef DEPRECATED__turtle_interfaces__msg__TurtleMsg
|
|
std::shared_ptr<turtle_interfaces::msg::TurtleMsg_<ContainerAllocator> const>
|
|
ConstPtr;
|
|
|
|
// comparison operators
|
|
bool operator==(const TurtleMsg_ & other) const
|
|
{
|
|
if (this->name != other.name) {
|
|
return false;
|
|
}
|
|
if (this->turtle_pose != other.turtle_pose) {
|
|
return false;
|
|
}
|
|
if (this->color != other.color) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
bool operator!=(const TurtleMsg_ & other) const
|
|
{
|
|
return !this->operator==(other);
|
|
}
|
|
}; // struct TurtleMsg_
|
|
|
|
// alias to use template instance with default allocator
|
|
using TurtleMsg =
|
|
turtle_interfaces::msg::TurtleMsg_<std::allocator<void>>;
|
|
|
|
// constant definitions
|
|
|
|
} // namespace msg
|
|
|
|
} // namespace turtle_interfaces
|
|
|
|
#endif // TURTLE_INTERFACES__MSG__DETAIL__TURTLE_MSG__STRUCT_HPP_
|