Removed redundant function
This commit is contained in:
@@ -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<Cargo> GetAccounts::getArgument() const { return nullptr; }
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
Get the accounts
|
||||
|
||||
|
||||
@@ -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<active::serialise::Cargo> getArgument() const override;
|
||||
/*!
|
||||
Get the accounts
|
||||
@return The accounts (empty array when none defined)
|
||||
|
||||
@@ -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<GetConfig>();
|
||||
//addMethod<UpdateConfig>();
|
||||
addMethod<UpdateConfig>();
|
||||
} //ConfigBridge::ConfigBridge
|
||||
|
||||
@@ -10,6 +10,7 @@ using namespace speckle::utility;
|
||||
|
||||
namespace {
|
||||
|
||||
///Return type for retrieving the current configuration
|
||||
using WrappedValue = CargoHold<PackageWrap, ConnectorConfig>;
|
||||
|
||||
}
|
||||
@@ -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<Cargo> GetConfig::getArgument() const { return nullptr; }
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
Get the configuration settings
|
||||
|
||||
|
||||
@@ -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<active::serialise::Cargo> getArgument() const override;
|
||||
/*!
|
||||
Get the configuration settings
|
||||
@return The settings
|
||||
|
||||
@@ -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<Cargo> UpdateConfig::getArgument() const { return std::make_unique<UpdateArgs>(); }
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
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
|
||||
|
||||
@@ -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<ConnectorConfig>;
|
||||
|
||||
/*!
|
||||
@@ -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<active::serialise::Cargo> 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;
|
||||
};
|
||||
|
||||
@@ -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<active::serialise::Cargo> getArgument() const override { return nullptr; } //Method doesn't take any arguments
|
||||
|
||||
private:
|
||||
/*!
|
||||
|
||||
@@ -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<active::serialise::Cargo> GetCallResult::getArgument() const {
|
||||
return std::make_unique<JSBridgeArgument>();
|
||||
} //GetCallResult::getArgument
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
Get the result for a specified call
|
||||
|
||||
|
||||
@@ -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<active::serialise::Cargo> getArgument() const override;
|
||||
|
||||
private:
|
||||
/*!
|
||||
|
||||
@@ -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<active::serialise::Cargo> RunMethod::getArgument() const {
|
||||
return std::make_unique<JSBridgeArgument>();
|
||||
} //RunMethod::getArgument
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
Run a specified bridge method
|
||||
|
||||
|
||||
@@ -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<active::serialise::Cargo> getArgument() const override;
|
||||
|
||||
private:
|
||||
/*!
|
||||
|
||||
@@ -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<Packaging> getArgument() const = 0;
|
||||
/*!
|
||||
Execute the function
|
||||
@param param The transported input parameter
|
||||
|
||||
Reference in New Issue
Block a user