Doxygen fails to generate nice docs, attempting to workaround

This commit is contained in:
Antony Polukhin 2014-09-24 19:41:54 +04:00
parent 171dfe696d
commit 56847ef9d6
2 changed files with 27 additions and 24 deletions

View File

@ -80,12 +80,6 @@ namespace detail {
* Overload that accepts path also throws std::bad_alloc in case of insufficient memory.
*/
template <class T>
boost::function<T> import_function(const boost::shared_ptr<shared_library>& lib, boost::string_ref func_name) {
return boost::dll::detail::refc_function<T>(lib, &lib->get<T>(func_name));
}
//! \overload boost::dll::import_function(const boost::shared_ptr<shared_library>& lib, boost::string_ref func_name)
template <class T>
boost::function<T> import_function(const boost::filesystem::path& lib,boost::string_ref func_name,
load_mode::type mode = load_mode::default_mode)
{
@ -95,6 +89,13 @@ boost::function<T> import_function(const boost::filesystem::path& lib,boost::str
);
}
//! \overload boost::dll::import_function(const boost::shared_ptr<shared_library>& lib, boost::string_ref func_name, load_mode::type mode)
template <class T>
boost::function<T> import_function(const boost::shared_ptr<shared_library>& lib, boost::string_ref func_name) {
return boost::dll::detail::refc_function<T>(lib, &lib->get<T>(func_name));
}
/*!
* Imports function by it alias name and returns boost::function<T> that holds the function
@ -134,12 +135,6 @@ boost::function<T> import_function(const boost::filesystem::path& lib,boost::str
*
*/
template <class T>
boost::function<T> import_function_alias(const boost::shared_ptr<shared_library>& lib, boost::string_ref func_name) {
return boost::dll::detail::refc_function<T>(lib, lib->get<T*>(func_name));
}
//! \overload boost::dll::import_function_alias(const boost::shared_ptr<shared_library>& lib, boost::string_ref func_name)
template <class T>
boost::function<T> import_function_alias(const boost::filesystem::path& lib, boost::string_ref func_name,
load_mode::type mode = load_mode::default_mode)
{
@ -149,6 +144,13 @@ boost::function<T> import_function_alias(const boost::filesystem::path& lib, boo
);
}
//! \overload boost::dll::import_function_alias(const boost::shared_ptr<shared_library>& lib, boost::string_ref func_name, load_mode::type mode)
template <class T>
boost::function<T> import_function_alias(const boost::shared_ptr<shared_library>& lib, boost::string_ref func_name) {
return boost::dll::detail::refc_function<T>(lib, lib->get<T*>(func_name));
}
}} // boost::dll
#endif // BOOST_DLL_IMPORT_FUNCTION_HPP

View File

@ -75,12 +75,6 @@ namespace detail {
*
*/
template <class T>
boost::shared_ptr<T> import_variable(const boost::shared_ptr<shared_library>& lib, boost::string_ref variable_name) {
return boost::shared_ptr<T>(&lib->get<T>(variable_name), boost::dll::detail::ptr_holding_empty_deleter(lib));
}
//! \overload boost::dll::import_variable(const boost::shared_ptr<shared_library>& lib, boost::string_ref variable_name)
template <class T>
boost::shared_ptr<T> import_variable(const boost::filesystem::path& lib, boost::string_ref variable_name,
load_mode::type mode = load_mode::default_mode)
{
@ -90,6 +84,12 @@ boost::shared_ptr<T> import_variable(const boost::filesystem::path& lib, boost::
);
}
//! \overload boost::dll::import_variable(const boost::shared_ptr<shared_library>& lib, boost::string_ref variable_name, load_mode::type mode)
template <class T>
boost::shared_ptr<T> import_variable(const boost::shared_ptr<shared_library>& lib, boost::string_ref variable_name) {
return boost::shared_ptr<T>(&lib->get<T>(variable_name), boost::dll::detail::ptr_holding_empty_deleter(lib));
}
/*!
@ -130,12 +130,6 @@ boost::shared_ptr<T> import_variable(const boost::filesystem::path& lib, boost::
*
*/
template <class T>
boost::shared_ptr<T> import_variable_alias(const boost::shared_ptr<shared_library>& lib, boost::string_ref variable_name) {
return boost::shared_ptr<T>(lib->get<T*>(variable_name), boost::dll::detail::ptr_holding_empty_deleter(lib));
}
//! \overload boost::dll::import_variable_alias(const boost::shared_ptr<shared_library>& lib, boost::string_ref variable_name)
template <class T>
boost::shared_ptr<T> import_variable_alias(const boost::filesystem::path& lib, boost::string_ref variable_name,
load_mode::type mode = load_mode::default_mode)
{
@ -145,6 +139,13 @@ boost::shared_ptr<T> import_variable_alias(const boost::filesystem::path& lib, b
);
}
//! \overload boost::dll::import_variable_alias(const boost::shared_ptr<shared_library>& lib, boost::string_ref variable_name, load_mode::type mode)
template <class T>
boost::shared_ptr<T> import_variable_alias(const boost::shared_ptr<shared_library>& lib, boost::string_ref variable_name) {
return boost::shared_ptr<T>(lib->get<T*>(variable_name), boost::dll::detail::ptr_holding_empty_deleter(lib));
}
}} // boost::dll
#endif // BOOST_DLL_IMPORT_VARIABLE_HPP