.. index:: pair: namespace; rgpot::plugin .. _doxid-namespacergpot_1_1plugin: namespace rgpot::plugin ======================= .. toctree:: :hidden: namespace_rgpot_plugin_detail.rst namespace_rgpot_plugin_dynlib.rst struct_rgpot_plugin_LoadedPlugin.rst class_rgpot_plugin_PluginRegistry.rst Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block namespace plugin { // namespaces namespace :ref:`rgpot::plugin::detail`; namespace :ref:`rgpot::plugin::dynlib`; // structs struct :ref:`LoadedPlugin`; // classes class :ref:`PluginRegistry`; // global functions const :ref:`rgpot_plugin_descriptor_t`* :target:`builtinLennardJones`(); std::unique_ptr<:ref:`PotentialBase`> :ref:`create_from_plugin`(const :ref:`rgpot_plugin_descriptor_t`* desc, const std::string& config = "{}"); } // namespace plugin .. _details-namespacergpot_1_1plugin: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Global Functions ---------------- .. index:: pair: function; create_from_plugin .. _doxid-_plugin_bridge_8cc_1a6d9271414ee0e4553a17e36b766f3aae: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::unique_ptr<:ref:`PotentialBase`> create_from_plugin(const :ref:`rgpot_plugin_descriptor_t`* desc, const std::string& config = "{}") Create a PotentialBase-compatible wrapper from a loaded plugin. The returned object owns the plugin instance and handles unit conversion. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - desc - Plugin descriptor (must outlive the returned object). * - config - JSON config string passed to desc->create(). .. rubric:: Returns: A unique_ptr to a :ref:`PotentialBase `.