From af6bb5013ce848c94e1d0711a6ef99af8a4a55a2 Mon Sep 17 00:00:00 2001 From: TizenOpenSource Date: Thu, 7 Dec 2023 11:27:50 +0900 Subject: Imported Upstream version 1.83.0 --- doc/html/boost/dll/experimental/smart_library.html | 207 ++++++++++----------- 1 file changed, 98 insertions(+), 109 deletions(-) (limited to 'doc/html/boost/dll/experimental/smart_library.html') diff --git a/doc/html/boost/dll/experimental/smart_library.html b/doc/html/boost/dll/experimental/smart_library.html index c36a2744a7..a1c18df940 100644 --- a/doc/html/boost/dll/experimental/smart_library.html +++ b/doc/html/boost/dll/experimental/smart_library.html @@ -8,7 +8,8 @@ - + + @@ -21,7 +22,7 @@

-PrevUpHomeNext +PrevUpHomeNext
@@ -29,8 +30,8 @@

Class smart_library

boost::dll::experimental::smart_library — This class is an extension of shared_library, which allows to load C++ symbols.

-

Synopsis

-
// In header: <boost/dll/smart_library.hpp>
+

Synopsis

+
// In header: <boost/dll/smart_library.hpp>
 
 
 class smart_library {
@@ -39,49 +40,49 @@
   typedef unspecified mangled_storage;
 
   // construct/copy/destruct
-  smart_library() noexcept;
-  smart_library(const boost::dll::fs::path &, 
+  smart_library() noexcept;
+  smart_library(const boost::dll::fs::path &, 
                 load_mode::type = load_mode::default_mode);
-  smart_library(const boost::dll::fs::path &, boost::dll::fs::error_code &, 
+  smart_library(const boost::dll::fs::path &, boost::dll::fs::error_code &, 
                 load_mode::type = load_mode::default_mode);
-  smart_library(const boost::dll::fs::path &, load_mode::type, 
+  smart_library(const boost::dll::fs::path &, load_mode::type, 
                 boost::dll::fs::error_code &);
-  smart_library(const smart_library &) noexcept;
-  smart_library(smart_library &&) noexcept;
-  explicit smart_library(const shared_library &) noexcept;
-  explicit smart_library(shared_library &&) noexcept;
-  ~smart_library();
+  smart_library(const smart_library &) noexcept;
+  smart_library(smart_library &&) noexcept;
+  explicit smart_library(const shared_library &) noexcept;
+  explicit smart_library(shared_library &&) noexcept;
+  ~smart_library();
 
-  // public member functions
-  const shared_library & shared_lib() const;
-  const mangled_storage & symbol_storage() const;
-  mangled_storage & symbol_storage();
-  void load(const boost::dll::fs::path &, 
+  // public member functions
+  const shared_library & shared_lib() const;
+  const mangled_storage & symbol_storage() const;
+  mangled_storage & symbol_storage();
+  void load(const boost::dll::fs::path &, 
             load_mode::type = load_mode::default_mode);
-  void load(const boost::dll::fs::path &, boost::dll::fs::error_code &, 
+  void load(const boost::dll::fs::path &, boost::dll::fs::error_code &, 
             load_mode::type = load_mode::default_mode);
-  void load(const boost::dll::fs::path &, load_mode::type, 
+  void load(const boost::dll::fs::path &, load_mode::type, 
             boost::dll::fs::error_code &);
-  template<typename T> T & get_variable(const std::string &) const;
-  template<typename Func> Func & get_function(const std::string &) const;
+  template<typename T> T & get_variable(const std::string &) const;
+  template<typename Func> Func & get_function(const std::string &) const;
   template<typename Class, typename Func> 
-    unspecified get_mem_fn(const std::string &) const;
+    unspecified get_mem_fn(const std::string &) const;
   template<typename Signature> 
-    constructor< Signature > get_constructor() const;
-  template<typename Class> destructor< Class > get_destructor() const;
-  template<typename Class> const std::type_info & get_type_info() const;
-  template<typename Alias> void add_type_alias(const std::string &);
-  void unload() noexcept;
-  bool is_loaded() const noexcept;
-  bool operator!() const noexcept;
-  explicit operator bool() const noexcept;
-  bool has(const char *) const noexcept;
-  bool has(const std::string &) const noexcept;
-  smart_library & assign(const smart_library &);
-  void swap(smart_library &) noexcept;
+    constructor< Signature > get_constructor() const;
+  template<typename Class> destructor< Class > get_destructor() const;
+  template<typename Class> const std::type_info & get_type_info() const;
+  template<typename Alias> void add_type_alias(const std::string &);
+  void unload() noexcept;
+  bool is_loaded() const noexcept;
+  bool operator!() const noexcept;
+  explicit operator bool() const noexcept;
+  bool has(const char *) const noexcept;
+  bool has(const std::string &) const noexcept;
+  smart_library & assign(const smart_library &);
+  void swap(smart_library &) noexcept;
 };
-

Description

+

Description

This class allows type safe loading of overloaded functions, member-functions, constructors and variables. It also allows to overwrite classes so they can be loaded, while being declared with different names.

@@ -105,17 +106,17 @@ Currently known limitations:

This does however not happen when the value is set inside the constructor function.

-

+

smart_library public construct/copy/destruct

  1. -
    smart_library() noexcept;
    +
    smart_library() noexcept;

    Creates in anstance that does not reference any DLL/DSO.

    -

    +ifile "/root/project/libs/dll/include/boost/dll/smart_library.hpp"

@@ -134,12 +135,12 @@ Currently known limitations:

  • -
    smart_library(const boost::dll::fs::path & lib_path, 
    +
    smart_library(const boost::dll::fs::path & lib_path, 
                   load_mode::type mode = load_mode::default_mode);

    Loads a library by specified path with a specified mode.

    -

    +xmlonly <link linkend='boost.dll.fs.system_error'>boost::dll::fs::system_error</link>, std::bad_alloc in case of insufficient memory.

    @@ -156,7 +157,7 @@ Currently known limitations:

    - + @@ -173,13 +174,13 @@ Currently known limitations:

    lib_path

    Library file name. Can handle std::string, const char*, std::wstring, const wchar_t* or boost::dll::fs::path.

    Library file name. Can handle std::string, const char*, std::wstring, const wchar_t* or boost::dll::fs::path.

    mode

  • -
    smart_library(const boost::dll::fs::path & lib_path, 
    +
    smart_library(const boost::dll::fs::path & lib_path, 
                   boost::dll::fs::error_code & ec, 
                   load_mode::type mode = load_mode::default_mode);

    Loads a library by specified path with a specified mode.

    -

    +This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    @@ -200,7 +201,7 @@ Currently known limitations:

    - + @@ -211,18 +212,15 @@ Currently known limitations:

    - +

    lib_path

    Library file name. Can handle std::string, const char*, std::wstring, const wchar_t* or boost::dll::fs::path.

    Library file name. Can handle std::string, const char*, std::wstring, const wchar_t* or boost::dll::fs::path.

    mode

    Throws:

    std::bad_alloc in case of insufficient memory. std::bad_alloc in case of insufficient memory.
  • +
  • smart_library(const boost::dll::fs::path & lib_path, load_mode::type mode, 
    +              boost::dll::fs::error_code & ec);
  • -
    smart_library(const boost::dll::fs::path & lib_path, load_mode::type mode, 
    -              boost::dll::fs::error_code & ec);
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    -
  • -
  • -
    smart_library(const smart_library & lib) noexcept;
    +
    smart_library(const smart_library & lib) noexcept;

    copy a smart_library object.

    @@ -254,7 +252,7 @@ Currently known limitations:

  • -
    smart_library(smart_library && lib) noexcept;
    +
    smart_library(smart_library && lib) noexcept;

    Move a smart_library object.

    @@ -286,7 +284,7 @@ Currently known limitations:

  • -
    explicit smart_library(const shared_library & lib) noexcept;
    +
    explicit smart_library(const shared_library & lib) noexcept;

    Construct from a shared_library object.

    @@ -318,7 +316,7 @@ Currently known limitations:

  • -
    explicit smart_library(shared_library && lib) noexcept;
    +
    explicit smart_library(shared_library && lib) noexcept;

    Construct from a shared_library object.

    @@ -350,7 +348,7 @@ Currently known limitations:

  • -
    ~smart_library();
    +
    ~smart_library();

    Destroys the smart_library. unload() is called if the DLL/DSO was loaded. If library was loaded multiple times by different instances of shared_library, the actual DLL/DSO won't be unloaded until there is at least one instance of shared_library.

    @@ -368,15 +366,15 @@ Currently known limitations:

    -

    -smart_library public member functions

    +

    +smart_library public member functions

    1. -
      const shared_library & shared_lib() const;
      +
      const shared_library & shared_lib() const;

      Get the underlying shared_library

    2. -
      const mangled_storage & symbol_storage() const;
      +
      const mangled_storage & symbol_storage() const;

      Access to the mangled storage, which is created on construction.

      @@ -392,15 +390,15 @@ Currently known limitations:

  • -
    mangled_storage & symbol_storage();
    Overload, for current development.
  • +
    mangled_storage & symbol_storage();
    Overload, for current development.
  • -
    void load(const boost::dll::fs::path & lib_path, 
    +
    void load(const boost::dll::fs::path & lib_path, 
               load_mode::type mode = load_mode::default_mode);

    Loads a library by specified path with a specified mode.

    Note that if some library is already loaded in this instance, load will call unload() and then load the new provided library.

    -

    +xmlonly <link linkend='boost.dll.fs.system_error'>boost::dll::fs::system_error</link>, std::bad_alloc in case of insufficient memory.

    @@ -417,7 +415,7 @@ Currently known limitations:

    - + @@ -434,14 +432,14 @@ Currently known limitations:

    lib_path

    Library file name. Can handle std::string, const char*, std::wstring, const wchar_t* or boost::dll::fs::path.

    Library file name. Can handle std::string, const char*, std::wstring, const wchar_t* or boost::dll::fs::path.

    mode

  • -
    void load(const boost::dll::fs::path & lib_path, 
    +
    void load(const boost::dll::fs::path & lib_path, 
               boost::dll::fs::error_code & ec, 
               load_mode::type mode = load_mode::default_mode);

    Loads a library by specified path with a specified mode.

    Note that if some library is already loaded in this instance, load will call unload() and then load the new provided library.

    -

    +This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    @@ -462,7 +460,7 @@ Currently known limitations:

    - + @@ -473,18 +471,15 @@ Currently known limitations:

    - +

    lib_path

    Library file name. Can handle std::string, const char*, std::wstring, const wchar_t* or boost::dll::fs::path.

    Library file name. Can handle std::string, const char*, std::wstring, const wchar_t* or boost::dll::fs::path.

    mode

    Throws:

    std::bad_alloc in case of insufficient memory. std::bad_alloc in case of insufficient memory.
  • +
  • void load(const boost::dll::fs::path & lib_path, load_mode::type mode, 
    +          boost::dll::fs::error_code & ec);
  • -
    void load(const boost::dll::fs::path & lib_path, load_mode::type mode, 
    -          boost::dll::fs::error_code & ec);
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    -
  • -
  • -
    template<typename T> T & get_variable(const std::string & name) const;
    +
    template<typename T> T & get_variable(const std::string & name) const;

    Load a variable from the referenced library.

    Unlinke shared_library::get this function will also load scoped variables, which also includes static class members.

    @@ -499,7 +494,7 @@ Currently known limitations:

    -

    +xmlonly <link linkend='boost.dll.fs.system_error'>boost::dll::fs::system_error</link> if symbol does not exist or if the DLL/DSO was not loaded.

    @@ -544,7 +539,7 @@ Currently known limitations:

  • -
    template<typename Func> Func & get_function(const std::string & name) const;
    +
    template<typename Func> Func & get_function(const std::string & name) const;

    Load a function from the referenced library.

    Example:

    smart_library lib("test_lib.so");
    @@ -565,7 +560,7 @@ Currently known limitations:

    -

    +xmlonly <link linkend='boost.dll.fs.system_error'>boost::dll::fs::system_error</link> if symbol does not exist or if the DLL/DSO was not loaded.

    @@ -611,7 +606,7 @@ Currently known limitations:

  • template<typename Class, typename Func> 
    -  unspecified get_mem_fn(const std::string & name) const;
    + unspecified get_mem_fn(const std::string & name) const;

    Load a member-function from the referenced library.

    Example (import class is MyClass, which is available inside the library and the host):

    smart_library lib("test_lib.so");
    @@ -634,7 +629,7 @@ Currently known limitations:

    -

    +xmlonly <link linkend='boost.dll.fs.system_error'>boost::dll::fs::system_error</link> if symbol does not exist or if the DLL/DSO was not loaded.

  • @@ -685,7 +680,7 @@ Currently known limitations:

  • -
    template<typename Signature> constructor< Signature > get_constructor() const;
    +
    template<typename Signature> constructor< Signature > get_constructor() const;

    Load a constructor from the referenced library.

    Example (import class is MyClass, which is available inside the library and the host):

    smart_library lib("test_lib.so");
    @@ -695,7 +690,7 @@ Currently known limitations:

    -

    +xmlonly <link linkend='boost.dll.fs.system_error'>boost::dll::fs::system_error</link> if symbol does not exist or if the DLL/DSO was not loaded.

    @@ -727,7 +722,7 @@ Currently known limitations:

  • -
    template<typename Class> destructor< Class > get_destructor() const;
    +
    template<typename Class> destructor< Class > get_destructor() const;

    Load a destructor from the referenced library.

    Example (import class is MyClass, which is available inside the library and the host):

    smart_library lib("test_lib.so");
    @@ -737,7 +732,7 @@ Currently known limitations:

    -

    +xmlonly <link linkend='boost.dll.fs.system_error'>boost::dll::fs::system_error</link> if symbol does not exist or if the DLL/DSO was not loaded.

    @@ -769,7 +764,7 @@ Currently known limitations:

  • -
    template<typename Class> const std::type_info & get_type_info() const;
    +
    template<typename Class> const std::type_info & get_type_info() const;

    Load the typeinfo of the given type.

    Example (import class is MyClass, which is available inside the library and the host):

    smart_library lib("test_lib.so");
    @@ -779,7 +774,7 @@ Currently known limitations:

    -

    +xmlonly <link linkend='boost.dll.fs.system_error'>boost::dll::fs::system_error</link> if symbol does not exist or if the DLL/DSO was not loaded.

    @@ -811,7 +806,7 @@ Currently known limitations:

  • -
    template<typename Alias> void add_type_alias(const std::string & name);
    +
    template<typename Alias> void add_type_alias(const std::string & name);

    This function can be used to add a type alias.

    This is to be used, when a class shall be imported, which is not declared on the host side.

    Example:

    @@ -863,11 +858,11 @@ Currently known limitations:

  • -
    void unload() noexcept;
    +
    void unload() noexcept;

    Unloads a shared library. If library was loaded multiple times by different instances, the actual DLL/DSO won't be unloaded until there is at least one instance that references the DLL/DSO.

    -

    +ifile "/root/project/libs/dll/include/boost/dll/smart_library.hpp"

    @@ -886,11 +881,11 @@ Currently known limitations:

  • -
    bool is_loaded() const noexcept;
    +
    bool is_loaded() const noexcept;

    Check if an library is loaded.

    -

    +ifile "/root/project/libs/dll/include/boost/dll/smart_library.hpp"

    @@ -909,11 +904,11 @@ Currently known limitations:

  • -
    bool operator!() const noexcept;
    +
    bool operator!() const noexcept;

    Check if an library is not loaded.

    -

    +ifile "/root/project/libs/dll/include/boost/dll/smart_library.hpp"

    @@ -932,15 +927,15 @@ Currently known limitations:

  • -
    explicit operator bool() const noexcept;
    bool() const

    bool() const

    +
    explicit operator bool() const noexcept;
    bool() const

    bool() const

  • -
    bool has(const char * symbol_name) const noexcept;
    +
    bool has(const char * symbol_name) const noexcept;

    Search for a given symbol on loaded library. Works for all symbols, including alias names.

    -

    +This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    @@ -971,17 +966,14 @@ Currently known limitations:

  • +
  • bool has(const std::string & symbol_name) const noexcept;
  • -
    bool has(const std::string & symbol_name) const noexcept;
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    -
  • -
  • -
    smart_library & assign(const smart_library & lib);
    +
    smart_library & assign(const smart_library & lib);

    Makes *this share the same shared object as lib. If *this is loaded, then unloads it.

    -

    +xmlonly <link linkend='boost.dll.fs.system_error'>boost::dll::fs::system_error</link>, std::bad_alloc in case of insufficient memory.

    @@ -1013,11 +1005,11 @@ Currently known limitations:

  • -
    void swap(smart_library & rhs) noexcept;
    +
    void swap(smart_library & rhs) noexcept;

    Swaps two libraries. Does not invalidate existing symbols and functions loaded from libraries.

    -

    +ifile "/root/project/libs/dll/include/boost/dll/smart_library.hpp"

    @@ -1048,17 +1040,14 @@ Currently known limitations:

    -
    - - -
    +

    -PrevUpHomeNext +PrevUpHomeNext
    -- cgit v1.2.3