Skip to content

Commit 4dbf24e

Browse files
committed
Move rcl_remap_copy to public header
Signed-off-by: Jorge Perez <[email protected]>
1 parent 66aa61e commit 4dbf24e

3 files changed

Lines changed: 25 additions & 26 deletions

File tree

rcl/include/rcl/remap.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,31 @@ rcl_remap_node_namespace(
247247
rcl_allocator_t allocator,
248248
char ** output_namespace);
249249

250+
/// Copy one remap structure into another.
251+
/**
252+
* <hr>
253+
* Attribute | Adherence
254+
* ------------------ | -------------
255+
* Allocates Memory | Yes
256+
* Thread-Safe | No
257+
* Uses Atomics | No
258+
* Lock-Free | Yes
259+
*
260+
* \param[in] rule The structure to be copied.
261+
* Its allocator is used to copy memory into the new structure.
262+
* \param[out] rule_out A zero-initialized rcl_remap_t structure to be copied into.
263+
* \return `RCL_RET_OK` if the structure was copied successfully, or
264+
* \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or
265+
* \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or
266+
* \return `RCL_RET_ERROR` if an unspecified error occurs.
267+
*/
268+
RCL_PUBLIC
269+
RCL_WARN_UNUSED
270+
rcl_ret_t
271+
rcl_remap_copy(
272+
const rcl_remap_t * rule,
273+
rcl_remap_t * rule_out);
274+
250275
/// Reclaim resources held inside rcl_remap_t structure.
251276
/**
252277
* <hr>

rcl/src/rcl/remap_impl.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -51,31 +51,6 @@ typedef struct rcl_remap_impl_t
5151
rcl_allocator_t allocator;
5252
} rcl_remap_impl_t;
5353

54-
/// Copy one remap structure into another.
55-
/**
56-
* <hr>
57-
* Attribute | Adherence
58-
* ------------------ | -------------
59-
* Allocates Memory | Yes
60-
* Thread-Safe | No
61-
* Uses Atomics | No
62-
* Lock-Free | Yes
63-
*
64-
* \param[in] rule The structure to be copied.
65-
* Its allocator is used to copy memory into the new structure.
66-
* \param[out] rule_out A zero-initialized rcl_remap_t structure to be copied into.
67-
* \return `RCL_RET_OK` if the structure was copied successfully, or
68-
* \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or
69-
* \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or
70-
* \return `RCL_RET_ERROR` if an unspecified error occurs.
71-
*/
72-
RCL_PUBLIC
73-
RCL_WARN_UNUSED
74-
rcl_ret_t
75-
rcl_remap_copy(
76-
const rcl_remap_t * rule,
77-
rcl_remap_t * rule_out);
78-
7954
#ifdef __cplusplus
8055
}
8156
#endif

rcl/test/rcl/test_remap.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "./allocator_testing_utils.h"
2323
#include "./arg_macros.hpp"
2424
#include "./arguments_impl.h"
25-
#include "./remap_impl.h"
2625

2726
#ifdef RMW_IMPLEMENTATION
2827
# define CLASSNAME_(NAME, SUFFIX) NAME ## __ ## SUFFIX

0 commit comments

Comments
 (0)