|
| 1 | +// generated from rosidl_generator_c/resource/idl__functions.h.em |
| 2 | +// with input from geometry_msgs:msg/PolygonInstance.idl |
| 3 | +// generated code does not contain a copyright notice |
| 4 | + |
| 5 | +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POLYGON_INSTANCE__FUNCTIONS_H_ |
| 6 | +#define GEOMETRY_MSGS__MSG__DETAIL__POLYGON_INSTANCE__FUNCTIONS_H_ |
| 7 | + |
| 8 | +#ifdef __cplusplus |
| 9 | +extern "C" |
| 10 | +{ |
| 11 | +#endif |
| 12 | + |
| 13 | +#include <stdbool.h> |
| 14 | +#include <stdlib.h> |
| 15 | + |
| 16 | +#include "rosidl_runtime_c/visibility_control.h" |
| 17 | +#include "geometry_msgs/msg/rosidl_generator_c__visibility_control.h" |
| 18 | + |
| 19 | +#include "geometry_msgs/msg/detail/polygon_instance__struct.h" |
| 20 | + |
| 21 | +/// Initialize msg/PolygonInstance message. |
| 22 | +/** |
| 23 | + * If the init function is called twice for the same message without |
| 24 | + * calling fini inbetween previously allocated memory will be leaked. |
| 25 | + * \param[in,out] msg The previously allocated message pointer. |
| 26 | + * Fields without a default value will not be initialized by this function. |
| 27 | + * You might want to call memset(msg, 0, sizeof( |
| 28 | + * geometry_msgs__msg__PolygonInstance |
| 29 | + * )) before or use |
| 30 | + * geometry_msgs__msg__PolygonInstance__create() |
| 31 | + * to allocate and initialize the message. |
| 32 | + * \return true if initialization was successful, otherwise false |
| 33 | + */ |
| 34 | +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs |
| 35 | +bool |
| 36 | +geometry_msgs__msg__PolygonInstance__init(geometry_msgs__msg__PolygonInstance * msg); |
| 37 | + |
| 38 | +/// Finalize msg/PolygonInstance message. |
| 39 | +/** |
| 40 | + * \param[in,out] msg The allocated message pointer. |
| 41 | + */ |
| 42 | +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs |
| 43 | +void |
| 44 | +geometry_msgs__msg__PolygonInstance__fini(geometry_msgs__msg__PolygonInstance * msg); |
| 45 | + |
| 46 | +/// Create msg/PolygonInstance message. |
| 47 | +/** |
| 48 | + * It allocates the memory for the message, sets the memory to zero, and |
| 49 | + * calls |
| 50 | + * geometry_msgs__msg__PolygonInstance__init(). |
| 51 | + * \return The pointer to the initialized message if successful, |
| 52 | + * otherwise NULL |
| 53 | + */ |
| 54 | +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs |
| 55 | +geometry_msgs__msg__PolygonInstance * |
| 56 | +geometry_msgs__msg__PolygonInstance__create(); |
| 57 | + |
| 58 | +/// Destroy msg/PolygonInstance message. |
| 59 | +/** |
| 60 | + * It calls |
| 61 | + * geometry_msgs__msg__PolygonInstance__fini() |
| 62 | + * and frees the memory of the message. |
| 63 | + * \param[in,out] msg The allocated message pointer. |
| 64 | + */ |
| 65 | +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs |
| 66 | +void |
| 67 | +geometry_msgs__msg__PolygonInstance__destroy(geometry_msgs__msg__PolygonInstance * msg); |
| 68 | + |
| 69 | +/// Check for msg/PolygonInstance message equality. |
| 70 | +/** |
| 71 | + * \param[in] lhs The message on the left hand size of the equality operator. |
| 72 | + * \param[in] rhs The message on the right hand size of the equality operator. |
| 73 | + * \return true if messages are equal, otherwise false. |
| 74 | + */ |
| 75 | +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs |
| 76 | +bool |
| 77 | +geometry_msgs__msg__PolygonInstance__are_equal(const geometry_msgs__msg__PolygonInstance * lhs, const geometry_msgs__msg__PolygonInstance * rhs); |
| 78 | + |
| 79 | +/// Copy a msg/PolygonInstance message. |
| 80 | +/** |
| 81 | + * This functions performs a deep copy, as opposed to the shallow copy that |
| 82 | + * plain assignment yields. |
| 83 | + * |
| 84 | + * \param[in] input The source message pointer. |
| 85 | + * \param[out] output The target message pointer, which must |
| 86 | + * have been initialized before calling this function. |
| 87 | + * \return true if successful, or false if either pointer is null |
| 88 | + * or memory allocation fails. |
| 89 | + */ |
| 90 | +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs |
| 91 | +bool |
| 92 | +geometry_msgs__msg__PolygonInstance__copy( |
| 93 | + const geometry_msgs__msg__PolygonInstance * input, |
| 94 | + geometry_msgs__msg__PolygonInstance * output); |
| 95 | + |
| 96 | +/// Initialize array of msg/PolygonInstance messages. |
| 97 | +/** |
| 98 | + * It allocates the memory for the number of elements and calls |
| 99 | + * geometry_msgs__msg__PolygonInstance__init() |
| 100 | + * for each element of the array. |
| 101 | + * \param[in,out] array The allocated array pointer. |
| 102 | + * \param[in] size The size / capacity of the array. |
| 103 | + * \return true if initialization was successful, otherwise false |
| 104 | + * If the array pointer is valid and the size is zero it is guaranteed |
| 105 | + # to return true. |
| 106 | + */ |
| 107 | +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs |
| 108 | +bool |
| 109 | +geometry_msgs__msg__PolygonInstance__Sequence__init(geometry_msgs__msg__PolygonInstance__Sequence * array, size_t size); |
| 110 | + |
| 111 | +/// Finalize array of msg/PolygonInstance messages. |
| 112 | +/** |
| 113 | + * It calls |
| 114 | + * geometry_msgs__msg__PolygonInstance__fini() |
| 115 | + * for each element of the array and frees the memory for the number of |
| 116 | + * elements. |
| 117 | + * \param[in,out] array The initialized array pointer. |
| 118 | + */ |
| 119 | +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs |
| 120 | +void |
| 121 | +geometry_msgs__msg__PolygonInstance__Sequence__fini(geometry_msgs__msg__PolygonInstance__Sequence * array); |
| 122 | + |
| 123 | +/// Create array of msg/PolygonInstance messages. |
| 124 | +/** |
| 125 | + * It allocates the memory for the array and calls |
| 126 | + * geometry_msgs__msg__PolygonInstance__Sequence__init(). |
| 127 | + * \param[in] size The size / capacity of the array. |
| 128 | + * \return The pointer to the initialized array if successful, otherwise NULL |
| 129 | + */ |
| 130 | +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs |
| 131 | +geometry_msgs__msg__PolygonInstance__Sequence * |
| 132 | +geometry_msgs__msg__PolygonInstance__Sequence__create(size_t size); |
| 133 | + |
| 134 | +/// Destroy array of msg/PolygonInstance messages. |
| 135 | +/** |
| 136 | + * It calls |
| 137 | + * geometry_msgs__msg__PolygonInstance__Sequence__fini() |
| 138 | + * on the array, |
| 139 | + * and frees the memory of the array. |
| 140 | + * \param[in,out] array The initialized array pointer. |
| 141 | + */ |
| 142 | +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs |
| 143 | +void |
| 144 | +geometry_msgs__msg__PolygonInstance__Sequence__destroy(geometry_msgs__msg__PolygonInstance__Sequence * array); |
| 145 | + |
| 146 | +/// Check for msg/PolygonInstance message array equality. |
| 147 | +/** |
| 148 | + * \param[in] lhs The message array on the left hand size of the equality operator. |
| 149 | + * \param[in] rhs The message array on the right hand size of the equality operator. |
| 150 | + * \return true if message arrays are equal in size and content, otherwise false. |
| 151 | + */ |
| 152 | +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs |
| 153 | +bool |
| 154 | +geometry_msgs__msg__PolygonInstance__Sequence__are_equal(const geometry_msgs__msg__PolygonInstance__Sequence * lhs, const geometry_msgs__msg__PolygonInstance__Sequence * rhs); |
| 155 | + |
| 156 | +/// Copy an array of msg/PolygonInstance messages. |
| 157 | +/** |
| 158 | + * This functions performs a deep copy, as opposed to the shallow copy that |
| 159 | + * plain assignment yields. |
| 160 | + * |
| 161 | + * \param[in] input The source array pointer. |
| 162 | + * \param[out] output The target array pointer, which must |
| 163 | + * have been initialized before calling this function. |
| 164 | + * \return true if successful, or false if either pointer |
| 165 | + * is null or memory allocation fails. |
| 166 | + */ |
| 167 | +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs |
| 168 | +bool |
| 169 | +geometry_msgs__msg__PolygonInstance__Sequence__copy( |
| 170 | + const geometry_msgs__msg__PolygonInstance__Sequence * input, |
| 171 | + geometry_msgs__msg__PolygonInstance__Sequence * output); |
| 172 | + |
| 173 | +#ifdef __cplusplus |
| 174 | +} |
| 175 | +#endif |
| 176 | + |
| 177 | +#endif // GEOMETRY_MSGS__MSG__DETAIL__POLYGON_INSTANCE__FUNCTIONS_H_ |
0 commit comments