-
Notifications
You must be signed in to change notification settings - Fork 133
Support arbitrary message namespaces #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f17172a
54de9b0
e2b36ec
a1eeadf
03c1d62
b5256e5
a29782d
3f34667
419a3cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,8 @@ | |
|
|
||
| #include <cassert> | ||
| #include <memory> | ||
| #include <regex> | ||
| #include <sstream> | ||
| #include <string> | ||
|
|
||
| #include "rmw_fastrtps_dynamic_cpp/MessageTypeSupport.hpp" | ||
|
|
@@ -34,9 +36,16 @@ MessageTypeSupport<MembersType>::MessageTypeSupport(const MembersType * members) | |
| assert(members); | ||
| this->members_ = members; | ||
|
|
||
| std::string name = std::string(members->package_name_) + "::msg::dds_::" + | ||
| members->message_name_ + "_"; | ||
| this->setName(name.c_str()); | ||
| std::ostringstream ss; | ||
| std::string message_namespace(this->members_->message_namespace_); | ||
| std::string message_name(this->members_->message_name_); | ||
| if (!message_namespace.empty()) { | ||
| // Find and replace C namespace separator with C++, in case this is using C typesupport | ||
| message_namespace = std::regex_replace(message_namespace, std::regex("__"), "::"); | ||
| ss << message_namespace << "::"; | ||
| } | ||
| ss << "dds_::" << message_name << "_"; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Couldn't this call Same below.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is declared the |
||
| this->setName(ss.str().c_str()); | ||
|
|
||
| // Fully bound by default | ||
| this->max_size_bound_ = true; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.