diff --git a/source/plugin-loading/ComponentPlugin.cpp b/source/plugin-loading/ComponentPlugin.cpp index 8ee1438..78ee049 100644 --- a/source/plugin-loading/ComponentPlugin.cpp +++ b/source/plugin-loading/ComponentPlugin.cpp @@ -58,10 +58,10 @@ void ComponentPlugin::initEncoding() { std::shared_ptr ComponentPlugin::createTransport(const std::string &name, ITransportSdk *sdk, const std::string &roleName, - const PluginConfig &pluginConfig) { + PluginConfig &pluginConfig) { TRACE_METHOD(path, name); initTransport(); - pluginConfig.pluginDirectory = fs::path(path).parent_path().string(); + pluginConfig.pluginDirectory = path; ITransportComponent *transport = createTransportImpl(name.c_str(), sdk, roleName.c_str(), pluginConfig); return std::shared_ptr(transport, destroyTransportImpl); @@ -70,10 +70,10 @@ ComponentPlugin::createTransport(const std::string &name, ITransportSdk *sdk, std::shared_ptr ComponentPlugin::createUserModel(const std::string &name, IUserModelSdk *sdk, const std::string &roleName, - const PluginConfig &pluginConfig) { + PluginConfig &pluginConfig) { TRACE_METHOD(path, name); initUserModel(); - pluginConfig.pluginDirectory = fs::path(path).parent_path().string(); + pluginConfig.pluginDirectory = path; return std::shared_ptr( createUserModelImpl(name.c_str(), sdk, roleName.c_str(), pluginConfig), destroyUserModelImpl); @@ -82,10 +82,10 @@ ComponentPlugin::createUserModel(const std::string &name, IUserModelSdk *sdk, std::shared_ptr ComponentPlugin::createEncoding(const std::string &name, IEncodingSdk *sdk, const std::string &roleName, - const PluginConfig &pluginConfig) { + PluginConfig &pluginConfig) { TRACE_METHOD(path, name); initEncoding(); - pluginConfig.pluginDirectory = fs::path(path).parent_path().string(); + const std::string pluginPath = path; return std::shared_ptr( createEncodingImpl(name.c_str(), sdk, roleName.c_str(), pluginConfig), destroyEncodingImpl); diff --git a/source/plugin-loading/ComponentPlugin.h b/source/plugin-loading/ComponentPlugin.h index a083f09..e8381a3 100644 --- a/source/plugin-loading/ComponentPlugin.h +++ b/source/plugin-loading/ComponentPlugin.h @@ -34,15 +34,15 @@ struct ComponentPlugin : public IComponentPlugin { virtual std::shared_ptr createTransport(const std::string &name, ITransportSdk *sdk, const std::string &roleName, - const PluginConfig &pluginConfig) override; + PluginConfig &pluginConfig) override; virtual std::shared_ptr createUserModel(const std::string &name, IUserModelSdk *sdk, const std::string &roleName, - const PluginConfig &pluginConfig) override; + PluginConfig &pluginConfig) override; virtual std::shared_ptr createEncoding(const std::string &name, IEncodingSdk *sdk, const std::string &roleName, - const PluginConfig &pluginConfig) override; + PluginConfig &pluginConfig) override; virtual std::string get_path() override; diff --git a/source/plugin-loading/IComponentPlugin.h b/source/plugin-loading/IComponentPlugin.h index 8a27e59..7050407 100644 --- a/source/plugin-loading/IComponentPlugin.h +++ b/source/plugin-loading/IComponentPlugin.h @@ -31,15 +31,15 @@ struct IComponentPlugin { virtual std::shared_ptr createTransport(const std::string &name, ITransportSdk *sdk, const std::string &roleName, - const PluginConfig &pluginConfig) = 0; + PluginConfig &pluginConfig) = 0; virtual std::shared_ptr createUserModel(const std::string &name, IUserModelSdk *sdk, const std::string &roleName, - const PluginConfig &pluginConfig) = 0; + PluginConfig &pluginConfig) = 0; virtual std::shared_ptr createEncoding(const std::string &name, IEncodingSdk *sdk, const std::string &roleName, - const PluginConfig &pluginConfig) = 0; + PluginConfig &pluginConfig) = 0; virtual std::string get_path() = 0; }; diff --git a/source/plugin-loading/PythonComponentPlugin.cpp b/source/plugin-loading/PythonComponentPlugin.cpp index 89fedcf..d59cf9b 100644 --- a/source/plugin-loading/PythonComponentPlugin.cpp +++ b/source/plugin-loading/PythonComponentPlugin.cpp @@ -149,10 +149,10 @@ PythonComponentPlugin::PythonComponentPlugin( std::shared_ptr PythonComponentPlugin::createTransport( const std::string &name, ITransportSdk *sdk, const std::string &roleName, - const PluginConfig &pluginConfig) { + PluginConfig &pluginConfig) { TRACE_METHOD(path, name); initPython("", pythonModulePath, pythonShimsPath); - pluginConfig.pluginDirectory = fs::path(path).string(); + pluginConfig.pluginDirectory = path; return std::shared_ptr( static_cast(createPythonComponentPlugin( FUNC_CREATE_TRANSPORT, path, pythonModule, SDK_TYPE_TRANSPORT, @@ -162,10 +162,10 @@ std::shared_ptr PythonComponentPlugin::createTransport( std::shared_ptr PythonComponentPlugin::createUserModel( const std::string &name, IUserModelSdk *sdk, const std::string &roleName, - const PluginConfig &pluginConfig) { + PluginConfig &pluginConfig) { TRACE_METHOD(path, name); initPython("", pythonModulePath, pythonShimsPath); - pluginConfig.pluginDirectory = fs::path(path).string(); + pluginConfig.pluginDirectory = path; return std::shared_ptr( static_cast(createPythonComponentPlugin( FUNC_CREATE_USER_MODEL, path, pythonModule, SDK_TYPE_USER_MODEL, @@ -175,10 +175,10 @@ std::shared_ptr PythonComponentPlugin::createUserModel( std::shared_ptr PythonComponentPlugin::createEncoding( const std::string &name, IEncodingSdk *sdk, const std::string &roleName, - const PluginConfig &pluginConfig) { + PluginConfig &pluginConfig) { TRACE_METHOD(path, name); initPython("", pythonModulePath, pythonShimsPath); - pluginConfig.pluginDirectory = fs::path(path).string(); + pluginConfig.pluginDirectory = path; return std::shared_ptr( static_cast(createPythonComponentPlugin( FUNC_CREATE_ENCODING, path, pythonModule, SDK_TYPE_ENCODING, diff --git a/source/plugin-loading/PythonComponentPlugin.h b/source/plugin-loading/PythonComponentPlugin.h index 727ad59..d434e7a 100644 --- a/source/plugin-loading/PythonComponentPlugin.h +++ b/source/plugin-loading/PythonComponentPlugin.h @@ -52,15 +52,15 @@ struct PythonComponentPlugin : public IComponentPlugin { virtual std::shared_ptr createTransport(const std::string &name, ITransportSdk *sdk, const std::string &roleName, - const PluginConfig &pluginConfig) override; + PluginConfig &pluginConfig) override; virtual std::shared_ptr createUserModel(const std::string &name, IUserModelSdk *sdk, const std::string &roleName, - const PluginConfig &pluginConfig) override; + PluginConfig &pluginConfig) override; virtual std::shared_ptr createEncoding(const std::string &name, IEncodingSdk *sdk, const std::string &roleName, - const PluginConfig &pluginConfig) override; + PluginConfig &pluginConfig) override; virtual std::string get_path() override;