Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Reference

Shared Library Reference
Shared Library Refcountable Reference

Shared Library Reference

Includes alias methods and macro. You can include this header or boost/dll/shared_library.hpp to reduce dependencies in case you do not use the refcountable functions.


BOOST_DLL_FORCE_ALIAS_INSTANTIATION
BOOST_DLL_FORCE_NO_WEAK_EXPORTS
BOOST_DLL_SELECTANY
BOOST_DLL_SECTION(SectionName, Permissions)
BOOST_DLL_ALIAS(FunctionOrVar, AliasName)
BOOST_DLL_ALIAS_SECTIONED(FunctionOrVar, AliasName, SectionName)
BOOST_DLL_AUTO_ALIAS(FunctionOrVar)

Contains only the boost::dll::library_info class that is capable of extracting different information from binaries.

namespace boost {
  namespace dll {
    class library_info;
  }
}

Provides methods for getting acceptable by boost::dll::shared_library location of symbol, source line or program.

namespace boost {
  namespace dll {
    template<typename T> 
      boost::filesystem::path 
      symbol_location(const T &, boost::system::error_code &);
    template<typename T> boost::filesystem::path symbol_location(const T &);
    boost::filesystem::path this_line_location(boost::system::error_code &);
    boost::filesystem::path this_line_location();
    boost::filesystem::path program_location(boost::system::error_code &);
    boost::filesystem::path program_location();
  }
}

Contains the boost::dll::shared_library class, core class for all the DLL/DSO operations.

namespace boost {
  namespace dll {
    class shared_library;

    // Very fast equality check that compares the actual DLL/DSO objects. Throws nothing. 
    bool operator==(const shared_library & lhs, const shared_library & rhs);

    // Very fast inequality check that compares the actual DLL/DSO objects. Throws nothing. 
    bool operator!=(const shared_library & lhs, const shared_library & rhs);

    // Compare the actual DLL/DSO objects without any guarantee to be stable between runs. Throws nothing. 
    bool operator<(const shared_library & lhs, const shared_library & rhs);

    // Swaps two shared libraries. Does not invalidate symbols and functions loaded from libraries. Throws nothing. 
    void swap(shared_library & lhs, shared_library & rhs);
  }
}

Contains only the boost::dll::load_mode::type enum and operators related to it.

namespace boost {
  namespace dll {
    namespace load_mode {
      enum type;

      // Free operators for load_mode::type flag manipulation. 
      BOOST_CONSTEXPR type operator|(type left, type right);
      BOOST_CXX14_CONSTEXPR type & operator|=(type & left, type right);
      BOOST_CONSTEXPR type operator&(type left, type right);
      BOOST_CXX14_CONSTEXPR type & operator&=(type & left, type right);
      BOOST_CONSTEXPR type operator^(type left, type right);
      BOOST_CXX14_CONSTEXPR type & operator^=(type & left, type right);
      BOOST_CONSTEXPR type operator~(type left);
    }
  }
}

Contains the boost::dll::experimental::smart_library class for loading mangled symbols.

[Warning] Warning

Extremely experimental! Requires C++14! Will change in next version of Boost! boost/dll/smart_library.hpp is not included in boost/dll.hpp

namespace boost {
  namespace dll {
    namespace experimental {
      class smart_library;

      // Very fast equality check that compares the actual DLL/DSO objects. Throws nothing. 
      bool operator==(const smart_library & lhs, const smart_library & rhs);

      // Very fast inequality check that compares the actual DLL/DSO objects. Throws nothing. 
      bool operator!=(const smart_library & lhs, const smart_library & rhs);

      // Compare the actual DLL/DSO objects without any guarantee to be stable between runs. Throws nothing. 
      bool operator<(const smart_library & lhs, const smart_library & rhs);

      // Swaps two shared libraries. Does not invalidate symbols and functions loaded from libraries. Throws nothing. 
      void swap(smart_library & lhs, smart_library & rhs);
    }
  }
}

Shared Library Refcountable Reference

Contains all the boost::dll::import* reference counting functions that hold a shared pointer to the instance of boost::dll::shared_library.

namespace boost {
  namespace dll {
    template<typename T> 
      result_type import(const boost::filesystem::path &, const char *, 
                         load_mode::type = load_mode::default_mode);
    template<typename T> 
      result_type import(const boost::filesystem::path &, const std::string &, 
                         load_mode::type = load_mode::default_mode);
    template<typename T> 
      result_type import(const shared_library &, const char *);
    template<typename T> 
      result_type import(const shared_library &, const std::string &);
    template<typename T> result_type import(shared_library &&, const char *);
    template<typename T> 
      result_type import(shared_library &&, const std::string &);
    template<typename T> 
      result_type import_alias(const boost::filesystem::path &, const char *, 
                               load_mode::type = load_mode::default_mode);
    template<typename T> 
      result_type import_alias(const boost::filesystem::path &, 
                               const std::string &, 
                               load_mode::type = load_mode::default_mode);
    template<typename T> 
      result_type import_alias(const shared_library &, const char *);
    template<typename T> 
      result_type import_alias(const shared_library &, const std::string &);
    template<typename T> 
      result_type import_alias(shared_library &&, const char *);
    template<typename T> 
      result_type import_alias(shared_library &&, const std::string &);
  }
}

PrevUpHomeNext