diff --git a/SpeckleConnector/Connector/Interface/Browser/Bridge/Account/GetAccounts.cpp b/SpeckleConnector/Connector/Interface/Browser/Bridge/Account/GetAccounts.cpp index 8ce92fa..338ae10 100644 --- a/SpeckleConnector/Connector/Interface/Browser/Bridge/Account/GetAccounts.cpp +++ b/SpeckleConnector/Connector/Interface/Browser/Bridge/Account/GetAccounts.cpp @@ -25,14 +25,6 @@ GetAccounts::GetAccounts() : JSBridgeMethod{"GetAccounts", [&]() { }} {} -/*-------------------------------------------------------------------- - Get an argument instance for the function (used to deserialise/unpack incoming arguments) - - return: An argument instance - --------------------------------------------------------------------*/ -std::unique_ptr GetAccounts::getArgument() const { return nullptr; } - - /*-------------------------------------------------------------------- Get the accounts diff --git a/SpeckleConnector/Connector/Interface/Browser/Bridge/Account/GetAccounts.h b/SpeckleConnector/Connector/Interface/Browser/Bridge/Account/GetAccounts.h index 0c9d7ba..8a68003 100644 --- a/SpeckleConnector/Connector/Interface/Browser/Bridge/Account/GetAccounts.h +++ b/SpeckleConnector/Connector/Interface/Browser/Bridge/Account/GetAccounts.h @@ -28,11 +28,6 @@ namespace connector::interfac::browser::bridge { // MARK: - Functions (const) - /*! - Get an argument instance for the function (used to deserialise/unpack incoming arguments) - @return An argument instance - */ - std::unique_ptr getArgument() const override; /*! Get the accounts @return The accounts (empty array when none defined) diff --git a/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/ConfigBridge.cpp b/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/ConfigBridge.cpp index 9cc0a0f..e18ea8a 100644 --- a/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/ConfigBridge.cpp +++ b/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/ConfigBridge.cpp @@ -1,8 +1,7 @@ #include "Connector/Interface/Browser/Bridge/Config/ConfigBridge.h" -#include "Connector/Interface/Browser/Bridge/Config/ConnectorConfig.h" #include "Connector/Interface/Browser/Bridge/Config/GetConfig.h" -//#include "Connector/Interface/Browser/Bridge/Config/UpdateConfig.h" +#include "Connector/Interface/Browser/Bridge/Config/UpdateConfig.h" using namespace connector::interfac::browser::bridge; @@ -12,5 +11,5 @@ using namespace connector::interfac::browser::bridge; ConfigBridge::ConfigBridge() : BrowserBridge{"configBinding"} { //Add bridge methods addMethod(); - //addMethod(); + addMethod(); } //ConfigBridge::ConfigBridge diff --git a/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/GetConfig.cpp b/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/GetConfig.cpp index 61e8c76..30c766c 100644 --- a/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/GetConfig.cpp +++ b/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/GetConfig.cpp @@ -10,6 +10,7 @@ using namespace speckle::utility; namespace { + ///Return type for retrieving the current configuration using WrappedValue = CargoHold; } @@ -24,14 +25,6 @@ GetConfig::GetConfig() : JSBridgeMethod{"GetConfig", [&]() { }} {} -/*-------------------------------------------------------------------- - Get an argument instance for the function (used to deserialise/unpack incoming arguments) - - return: An argument instance - --------------------------------------------------------------------*/ -std::unique_ptr GetConfig::getArgument() const { return nullptr; } - - /*-------------------------------------------------------------------- Get the configuration settings diff --git a/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/GetConfig.h b/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/GetConfig.h index 927c420..92fbba0 100644 --- a/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/GetConfig.h +++ b/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/GetConfig.h @@ -28,11 +28,6 @@ namespace connector::interfac::browser::bridge { // MARK: - Functions (const) - /*! - Get an argument instance for the function (used to deserialise/unpack incoming arguments) - @return An argument instance - */ - std::unique_ptr getArgument() const override; /*! Get the configuration settings @return The settings diff --git a/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/UpdateConfig.cpp b/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/UpdateConfig.cpp index b080c9f..7dcd306 100644 --- a/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/UpdateConfig.cpp +++ b/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/UpdateConfig.cpp @@ -19,17 +19,9 @@ UpdateConfig::UpdateConfig() : JSBridgeMethod{"UpdateConfig", [&](UpdateArgs arg /*-------------------------------------------------------------------- - Get an argument instance for the function (used to deserialise/unpack incoming arguments) + Update the configuration settings - return: An argument instance - --------------------------------------------------------------------*/ -std::unique_ptr UpdateConfig::getArgument() const { return std::make_unique(); } - - -/*-------------------------------------------------------------------- - Get the configuration settings - - return: The new settings + config: The new settings --------------------------------------------------------------------*/ void UpdateConfig::run(const ConnectorConfig& config) const { ///TODO: Store the active configuration settings here diff --git a/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/UpdateConfig.h b/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/UpdateConfig.h index cc72c7b..d696911 100644 --- a/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/UpdateConfig.h +++ b/SpeckleConnector/Connector/Interface/Browser/Bridge/Config/UpdateConfig.h @@ -9,7 +9,7 @@ namespace connector::interfac::browser::bridge { class ConnectorConfig; - ///Arguments for a JS call to update the configuration + ///Argument for a JS call to update the configuration using UpdateArgs = speckle::interfac::browser::bridge::JSArgType; /*! @@ -35,13 +35,8 @@ namespace connector::interfac::browser::bridge { // MARK: - Functions (const) /*! - Get an argument instance for the function (used to deserialise/unpack incoming arguments) - @return An argument instance - */ - std::unique_ptr getArgument() const override; - /*! - Get the configuration settings - @return The new settings + Update the configuration settings + @param config The new settings */ void run(const ConnectorConfig& config) const; }; diff --git a/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetBindingsMethodNames.h b/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetBindingsMethodNames.h index 051f7bb..4535785 100644 --- a/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetBindingsMethodNames.h +++ b/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetBindingsMethodNames.h @@ -31,11 +31,6 @@ namespace speckle::interfac::browser::bridge { @return A clone of this object */ GetBindingsMethodNames* clonePtr() const override { return new GetBindingsMethodNames{*this}; } - /*! - Get an argument instance for the function (used to deserialise/unpack incoming arguments) - @return An argument instance - */ - std::unique_ptr getArgument() const override { return nullptr; } //Method doesn't take any arguments private: /*! diff --git a/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetCallResult.cpp b/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetCallResult.cpp index a072dd5..75f04cc 100644 --- a/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetCallResult.cpp +++ b/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetCallResult.cpp @@ -30,16 +30,6 @@ GetCallResult::GetCallResult(BrowserBridge& bridge) : m_bridge{bridge}, } //GetCallResult::GetCallResult -/*-------------------------------------------------------------------- - Get an argument instance for the function (used to deserialise/unpack incoming arguments) - - return: An argument instance - --------------------------------------------------------------------*/ -std::unique_ptr GetCallResult::getArgument() const { - return std::make_unique(); -} //GetCallResult::getArgument - - /*-------------------------------------------------------------------- Get the result for a specified call diff --git a/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetCallResult.h b/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetCallResult.h index 2809b02..d129973 100644 --- a/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetCallResult.h +++ b/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetCallResult.h @@ -38,11 +38,6 @@ namespace speckle::interfac::browser::bridge { @return A clone of this object */ GetCallResult* clonePtr() const override { return new GetCallResult{*this}; } - /*! - Get an argument instance for the function (used to deserialise/unpack incoming arguments) - @return An argument instance - */ - std::unique_ptr getArgument() const override; private: /*! diff --git a/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/RunMethod.cpp b/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/RunMethod.cpp index 41d692e..bc67736 100644 --- a/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/RunMethod.cpp +++ b/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/RunMethod.cpp @@ -61,16 +61,6 @@ RunMethod::RunMethod(BrowserBridge& bridge) : m_bridge{bridge}, } //RunMethod::RunMethod -/*-------------------------------------------------------------------- - Get an argument instance for the function (used to deserialise/unpack incoming arguments) - - return: An argument instance - --------------------------------------------------------------------*/ -std::unique_ptr RunMethod::getArgument() const { - return std::make_unique(); -} //RunMethod::getArgument - - /*-------------------------------------------------------------------- Run a specified bridge method diff --git a/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/RunMethod.h b/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/RunMethod.h index 465e0c4..261454a 100644 --- a/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/RunMethod.h +++ b/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/RunMethod.h @@ -33,11 +33,6 @@ namespace speckle::interfac::browser::bridge { @return A clone of this object */ RunMethod* clonePtr() const override { return new RunMethod{*this}; } - /*! - Get an argument instance for the function (used to deserialise/unpack incoming arguments) - @return An argument instance - */ - std::unique_ptr getArgument() const override; private: /*! diff --git a/SpeckleLib/Speckle/Interface/Browser/Functional.h b/SpeckleLib/Speckle/Interface/Browser/Functional.h index 14c5b35..18710b2 100644 --- a/SpeckleLib/Speckle/Interface/Browser/Functional.h +++ b/SpeckleLib/Speckle/Interface/Browser/Functional.h @@ -25,11 +25,6 @@ namespace speckle::interfac::browser { @return The function name */ virtual speckle::utility::String getName() const = 0; - /*! - Get an argument instance for the function (used to deserialise/unpack incoming arguments) - @return An argument instance - */ - virtual std::unique_ptr getArgument() const = 0; /*! Execute the function @param param The transported input parameter