Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions pluginlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ if(BUILD_TESTING)
include_directories(include test/include)

add_library(test_plugins SHARED ./test/test_plugins.cpp)
target_compile_definitions(test_plugins PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")
target_compile_definitions(test_plugins PRIVATE "TEST_PLUGINLIB_FIXTURE_BUILDING_LIBRARY")
ament_target_dependencies(
test_plugins
Expand Down Expand Up @@ -129,7 +128,6 @@ if(BUILD_TESTING)
rcutils
TinyXML2
)
target_compile_definitions(${PROJECT_NAME}_unique_ptr_test PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")

if(UNIX AND NOT APPLE)
target_link_libraries(${PROJECT_NAME}_unique_ptr_test ${FILESYSTEM_LIB})
Expand All @@ -151,7 +149,6 @@ if(BUILD_TESTING)
rcutils
TinyXML2
)
target_compile_definitions(${PROJECT_NAME}_utest PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")

if(UNIX AND NOT APPLE)
target_link_libraries(${PROJECT_NAME}_utest ${FILESYSTEM_LIB})
Expand Down
14 changes: 0 additions & 14 deletions pluginlib/include/pluginlib/class_loader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@
# include <memory>
#endif

#ifndef PLUGINLIB__DISABLE_BOOST_FUNCTIONS
#include <boost/shared_ptr.hpp>
#endif

#include "class_loader/multi_library_class_loader.hpp"
#include "pluginlib/class_desc.hpp"
#include "pluginlib/class_loader_base.hpp"
Expand Down Expand Up @@ -125,16 +121,6 @@ class ClassLoader : public ClassLoaderBase
std::shared_ptr<T> createSharedInstance(const std::string & lookup_name);
#endif

#ifndef PLUGINLIB__DISABLE_BOOST_FUNCTIONS
/// Create an instance of a desired class.
/**
* Deprecated, use createSharedInstance() instead.
* Same as createSharedInstance() except it returns a boost::shared_ptr.
*/
[[deprecated]]
boost::shared_ptr<T> createInstance(const std::string & lookup_name);
#endif

#if defined(HAS_CPP11_MEMORY) && HAS_CPP11_MEMORY
/// Create an instance of a desired class.
/**
Expand Down
35 changes: 0 additions & 35 deletions pluginlib/include/pluginlib/class_loader_imp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,41 +169,6 @@ std::shared_ptr<T> ClassLoader<T>::createSharedInstance(const std::string & look
}
#endif

#ifndef PLUGINLIB__DISABLE_BOOST_FUNCTIONS
template<class T>
boost::shared_ptr<T> ClassLoader<T>::createInstance(const std::string & lookup_name)
/***************************************************************************/
{
RCUTILS_LOG_DEBUG_NAMED("pluginlib.ClassLoader",
"Attempting to create managed instance for class %s.",
lookup_name.c_str());

if (!isClassLoaded(lookup_name)) {
loadLibraryForClass(lookup_name);
}

try {
std::string class_type = getClassType(lookup_name);
RCUTILS_LOG_DEBUG_NAMED("pluginlib.ClassLoader", "%s maps to real class type %s",
lookup_name.c_str(), class_type.c_str());

boost::shared_ptr<T> obj = lowlevel_class_loader_.createInstance<T>(class_type);

RCUTILS_LOG_DEBUG_NAMED("pluginlib.ClassLoader",
"boost::shared_ptr to object of real type %s created.",
class_type.c_str());

return obj;
} catch (const class_loader::CreateClassException & ex) {
RCUTILS_LOG_DEBUG_NAMED("pluginlib.ClassLoader",
"Exception raised by low-level multi-library class loader when attempting "
"to create instance of class %s.",
lookup_name.c_str());
throw pluginlib::CreateClassException(ex.what());
}
}
#endif

#if defined(HAS_CPP11_MEMORY) && HAS_CPP11_MEMORY
template<class T>
UniquePtr<T> ClassLoader<T>::createUniqueInstance(const std::string & lookup_name)
Expand Down