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
Fix get type support handle #9
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7cfe203
move the visibility header
wjwwood 9332318
add type support introspection specific headers
wjwwood 120f3f1
use absolute includes for package local includes
wjwwood b71e3c0
renaming headers and functions to match style
wjwwood 61d63dd
adding missing dependency on rosidl_generator_c
wjwwood File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
...l_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/Identifier.h
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
...ort_introspection_cpp/include/rosidl_typesupport_introspection_cpp/ServiceIntrospection.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/identifier.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_IDENTIFIER_HPP_ | ||
#define ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_IDENTIFIER_HPP_ | ||
|
||
namespace rosidl_typesupport_introspection_cpp | ||
{ | ||
|
||
static const char * typesupport_introspection_identifier = "introspection"; | ||
|
||
} // namespace rosidl_typesupport_introspection_cpp | ||
|
||
#endif // ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_IDENTIFIER_HPP_ |
58 changes: 58 additions & 0 deletions
58
...e/rosidl_typesupport_introspection_cpp/impl/rosidl_generator_cpp/message_type_support.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* Copyright 2015 Open Source Robotics Foundation, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
// This header contains the type support introspection specific implementation | ||
// of the <rosidl_generator_cpp/message_type_support_decl.hpp> header. | ||
|
||
#ifndef __rosidl_generator_cpp__message_type_support__hpp__ | ||
#define __rosidl_generator_cpp__message_type_support__hpp__ | ||
|
||
// Provides the definition of the rosidl_message_type_support_t struct. | ||
#include <rosidl_generator_c/message_type_support.h> | ||
// Provides visibility macros like ROSIDL_PUBLIC. | ||
#include <rosidl_generator_c/visibility_control.h> | ||
// Provides the declaration of the function | ||
// rosidl_generator_cpp::get_message_type_support_handle. | ||
#include <rosidl_generator_cpp/message_type_support_decl.hpp> | ||
|
||
namespace rosidl_typesupport_introspection_cpp | ||
{ | ||
|
||
// This is implemented in the shared library provided by this package. | ||
template<typename T> | ||
ROSIDL_PUBLIC | ||
const rosidl_message_type_support_t * get_message_type_support_handle_introspection(); | ||
|
||
} // namespace rosidl_typesupport_introspection_cpp | ||
|
||
namespace rosidl_generator_cpp | ||
{ | ||
|
||
template<typename T> | ||
const rosidl_message_type_support_t * get_message_type_support_handle() | ||
{ | ||
// Hand off to implementation specific handle getter. | ||
// By using this implementation specific getter in this header, it makes | ||
// the user executable or library have a reference to an implementation | ||
// specific symbol, which is implemented in the implementation specific | ||
// message library. This is intentional to allow the linker to pick the | ||
// correct implementation specific message library when being over linked | ||
// with multiple implementation options. | ||
return rosidl_typesupport_introspection_cpp::get_message_type_support_handle_introspection<T>(); | ||
} | ||
|
||
} // namespace rosidl_generator_cpp | ||
|
||
#endif // __rosidl_generator_cpp__message_type_support__hpp__ |
58 changes: 58 additions & 0 deletions
58
...e/rosidl_typesupport_introspection_cpp/impl/rosidl_generator_cpp/service_type_support.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* Copyright 2015 Open Source Robotics Foundation, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
// This header contains the type support introspection specific implementation | ||
// of the <rosidl_generator_cpp/service_type_support_decl.hpp> header. | ||
|
||
#ifndef __rosidl_generator_cpp__service_type_support__hpp__ | ||
#define __rosidl_generator_cpp__service_type_support__hpp__ | ||
|
||
// Provides the definition of the rosidl_service_type_support_t struct. | ||
#include <rosidl_generator_c/service_type_support.h> | ||
// Provides visibility macros like ROSIDL_PUBLIC. | ||
#include <rosidl_generator_c/visibility_control.h> | ||
// Provides the declaration of the function | ||
// rosidl_generator_cpp::get_service_type_support_handle. | ||
#include <rosidl_generator_cpp/service_type_support_decl.hpp> | ||
|
||
namespace rosidl_typesupport_introspection_cpp | ||
{ | ||
|
||
// This is implemented in the shared library provided by this package. | ||
template<typename T> | ||
ROSIDL_PUBLIC | ||
const rosidl_service_type_support_t * get_service_type_support_handle_introspection(); | ||
|
||
} // namespace rosidl_typesupport_introspection_cpp | ||
|
||
namespace rosidl_generator_cpp | ||
{ | ||
|
||
template<typename T> | ||
const rosidl_service_type_support_t * get_service_type_support_handle() | ||
{ | ||
// Hand off to implementation specific handle getter. | ||
// By using this implementation specific getter in this header, it makes | ||
// the user executable or library have a reference to an implementation | ||
// specific symbol, which is implemented in the implementation specific | ||
// service library. This is intentional to allow the linker to pick the | ||
// correct implementation specific service library when being over linked | ||
// with multiple implementation options. | ||
return rosidl_typesupport_introspection_cpp::get_service_type_support_handle_introspection<T>(); | ||
} | ||
|
||
} // namespace rosidl_generator_cpp | ||
|
||
#endif // __rosidl_generator_cpp__service_type_support__hpp__ |
58 changes: 0 additions & 58 deletions
58
..._introspection_cpp/include/rosidl_typesupport_introspection_cpp/impl/visibility_control.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the CMake docs it looks like that you can specify both definitions in a single invocation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I actually meant to remove the flag above, along with the whole visibility header in the
rosidl_typesupport_introspection_cpp
package. I'll update it one way or another.