rmw_fastrtps_shared_cpp  master
Code shared on static and dynamic type support of rmw_fastrtps_cpp.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
namespace_prefix.hpp
Go to the documentation of this file.
1 // Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef RMW_FASTRTPS_SHARED_CPP__NAMESPACE_PREFIX_HPP_
16 #define RMW_FASTRTPS_SHARED_CPP__NAMESPACE_PREFIX_HPP_
17 
18 #include <vector>
19 #include <string>
20 
22 
23 extern "C"
24 {
25 RMW_FASTRTPS_SHARED_CPP_PUBLIC extern const char * const ros_topic_prefix;
28 
30 } // extern "C"
31 
33 
41 _resolve_prefix(const std::string & name, const std::string & prefix);
42 
46 _get_ros_prefix_if_exists(const std::string & topic_name);
47 
51 _strip_ros_prefix_if_exists(const std::string & topic_name);
52 
57 #endif // RMW_FASTRTPS_SHARED_CPP__NAMESPACE_PREFIX_HPP_
std::string
ros_service_requester_prefix
const char *const ros_service_requester_prefix
std::vector
_strip_ros_prefix_if_exists
std::string _strip_ros_prefix_if_exists(const std::string &topic_name)
Returns the topic name stripped of and ROS specific prefix if exists.
RMW_FASTRTPS_SHARED_CPP_PUBLIC
#define RMW_FASTRTPS_SHARED_CPP_PUBLIC
Definition: visibility_control.h:50
_get_all_ros_prefixes
const std::vector< std::string > & _get_all_ros_prefixes()
Returns the list of ros prefixes.
_get_ros_prefix_if_exists
std::string _get_ros_prefix_if_exists(const std::string &topic_name)
Return the ROS specific prefix if it exists, otherwise "".
ros_service_response_prefix
const char *const ros_service_response_prefix
visibility_control.h
_ros_prefixes
const std::vector< std::string > _ros_prefixes
_resolve_prefix
std::string _resolve_prefix(const std::string &name, const std::string &prefix)
Returns name stripped of prefix if exists, if not return "".
ros_topic_prefix
const char *const ros_topic_prefix