File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/main/java/com/eprosima/fastcdr/idl/templates Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -154,10 +154,10 @@ class RpcFuture {
154
154
~RpcFuture();
155
155
RpcFuture& operator=(const RpcFuture& rhs) = delete;
156
156
RpcFuture& operator=(RpcFuture&&) noexcept;
157
-
157
+
158
158
// retrieving the value
159
159
R get();
160
-
160
+
161
161
// functions to check state
162
162
bool valid() const noexcept;
163
163
void wait() const;
@@ -350,6 +350,11 @@ $if(member.typecode.isStringType && member.typecode.isBounded)$
350
350
eprosima::fastcdr::fixed_string<$member.typecode.maxsize$> tmp(value);
351
351
\$self->$member.name$(tmp);
352
352
}
353
+
354
+ std::string $member.name$_str() const
355
+ {
356
+ return std::string(\$self->$member.name$(), strnlen(\$self->$member.name$(), $member.typecode.maxsize$));
357
+ }
353
358
}
354
359
$endif$
355
360
@@ -406,7 +411,7 @@ output_non_feed(type) ::= <<
406
411
%shared_ptr(eprosima::fastdds::dds::rpc::RpcFuture<$type.cppTypename$>);
407
412
%template($type.formatedCppTypename$_rpc_future) eprosima::fastdds::dds::rpc::RpcFuture<$type.cppTypename$>;
408
413
409
- $!
414
+ $!
410
415
// Combine the typemap from shared_ptr
411
416
// https://github.com/swig/swig/blob/b96b955ca15a01f0425fb26c234528530923202a/Lib/python/boost_shared_ptr.i#L41-L44
412
417
// with the use of the 'optimal' attribute to avoid the need for a copy constructor, inspired by
You can’t perform that action at this time.
0 commit comments