Skip to content

Commit b076db7

Browse files
authored
Remove deprecated boost functions (#199)
Removes PLUGINLIB__DISABLE_BOOST_FUNCTIONS Fixes downstream missing include with rolling distro Signed-off-by: Shane Loretz<sloretz@openrobotics.org> Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
1 parent a7468c9 commit b076db7

3 files changed

Lines changed: 0 additions & 52 deletions

File tree

pluginlib/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ if(BUILD_TESTING)
9696
include_directories(include test/include)
9797

9898
add_library(test_plugins SHARED ./test/test_plugins.cpp)
99-
target_compile_definitions(test_plugins PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")
10099
target_compile_definitions(test_plugins PRIVATE "TEST_PLUGINLIB_FIXTURE_BUILDING_LIBRARY")
101100
ament_target_dependencies(
102101
test_plugins
@@ -129,7 +128,6 @@ if(BUILD_TESTING)
129128
rcutils
130129
TinyXML2
131130
)
132-
target_compile_definitions(${PROJECT_NAME}_unique_ptr_test PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")
133131

134132
if(UNIX AND NOT APPLE)
135133
target_link_libraries(${PROJECT_NAME}_unique_ptr_test ${FILESYSTEM_LIB})
@@ -151,7 +149,6 @@ if(BUILD_TESTING)
151149
rcutils
152150
TinyXML2
153151
)
154-
target_compile_definitions(${PROJECT_NAME}_utest PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")
155152

156153
if(UNIX AND NOT APPLE)
157154
target_link_libraries(${PROJECT_NAME}_utest ${FILESYSTEM_LIB})

pluginlib/include/pluginlib/class_loader.hpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@
5151
# include <memory>
5252
#endif
5353

54-
#ifndef PLUGINLIB__DISABLE_BOOST_FUNCTIONS
55-
#include <boost/shared_ptr.hpp>
56-
#endif
57-
5854
#include "class_loader/multi_library_class_loader.hpp"
5955
#include "pluginlib/class_desc.hpp"
6056
#include "pluginlib/class_loader_base.hpp"
@@ -125,16 +121,6 @@ class ClassLoader : public ClassLoaderBase
125121
std::shared_ptr<T> createSharedInstance(const std::string & lookup_name);
126122
#endif
127123

128-
#ifndef PLUGINLIB__DISABLE_BOOST_FUNCTIONS
129-
/// Create an instance of a desired class.
130-
/**
131-
* Deprecated, use createSharedInstance() instead.
132-
* Same as createSharedInstance() except it returns a boost::shared_ptr.
133-
*/
134-
[[deprecated]]
135-
boost::shared_ptr<T> createInstance(const std::string & lookup_name);
136-
#endif
137-
138124
#if defined(HAS_CPP11_MEMORY) && HAS_CPP11_MEMORY
139125
/// Create an instance of a desired class.
140126
/**

pluginlib/include/pluginlib/class_loader_imp.hpp

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -169,41 +169,6 @@ std::shared_ptr<T> ClassLoader<T>::createSharedInstance(const std::string & look
169169
}
170170
#endif
171171

172-
#ifndef PLUGINLIB__DISABLE_BOOST_FUNCTIONS
173-
template<class T>
174-
boost::shared_ptr<T> ClassLoader<T>::createInstance(const std::string & lookup_name)
175-
/***************************************************************************/
176-
{
177-
RCUTILS_LOG_DEBUG_NAMED("pluginlib.ClassLoader",
178-
"Attempting to create managed instance for class %s.",
179-
lookup_name.c_str());
180-
181-
if (!isClassLoaded(lookup_name)) {
182-
loadLibraryForClass(lookup_name);
183-
}
184-
185-
try {
186-
std::string class_type = getClassType(lookup_name);
187-
RCUTILS_LOG_DEBUG_NAMED("pluginlib.ClassLoader", "%s maps to real class type %s",
188-
lookup_name.c_str(), class_type.c_str());
189-
190-
boost::shared_ptr<T> obj = lowlevel_class_loader_.createInstance<T>(class_type);
191-
192-
RCUTILS_LOG_DEBUG_NAMED("pluginlib.ClassLoader",
193-
"boost::shared_ptr to object of real type %s created.",
194-
class_type.c_str());
195-
196-
return obj;
197-
} catch (const class_loader::CreateClassException & ex) {
198-
RCUTILS_LOG_DEBUG_NAMED("pluginlib.ClassLoader",
199-
"Exception raised by low-level multi-library class loader when attempting "
200-
"to create instance of class %s.",
201-
lookup_name.c_str());
202-
throw pluginlib::CreateClassException(ex.what());
203-
}
204-
}
205-
#endif
206-
207172
#if defined(HAS_CPP11_MEMORY) && HAS_CPP11_MEMORY
208173
template<class T>
209174
UniquePtr<T> ClassLoader<T>::createUniqueInstance(const std::string & lookup_name)

0 commit comments

Comments
 (0)