namespace rgpot::plugin¶
Overview¶
namespace plugin {
// namespaces
namespace rgpot::plugin::detail;
namespace rgpot::plugin::dynlib;
// structs
struct LoadedPlugin;
// classes
class PluginRegistry;
// global functions
const rgpot_plugin_descriptor_t* builtinLennardJones();
std::unique_ptr<PotentialBase> create_from_plugin(const rgpot_plugin_descriptor_t* desc, const std::string& config = “{}”);
} // namespace plugin
Detailed Documentation¶
Global Functions¶
std::unique_ptr<PotentialBase> create_from_plugin(const 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.
Parameters:
desc |
Plugin descriptor (must outlive the returned object). |
config |
JSON config string passed to desc->create(). |
Returns:
A unique_ptr to a PotentialBase.