Files
speckle-cpp-connectors/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetBindingsMethodNames.cpp
T
Ralph Wessel 696a4ea870 Added TestBinding and implemented associated test methods
Added speckle::utility::Exception
Added ErrorReport for BrowserBridge method execution
JSBridgeArgument is capable of capturing error conditions for later reporting
Implemented additional exception handling and return report to JS on method execution failure
2024-08-27 16:48:42 +01:00

29 lines
1.2 KiB
C++

#include "Speckle/Interface/Browser/Bridge/Functions/GetBindingsMethodNames.h"
#include "Speckle/Interface/Browser/Bridge/BrowserBridge.h"
using namespace active::serialise;
using namespace speckle::serialise::jsbase;
using namespace speckle::interfac::browser;
using namespace speckle::interfac::browser::bridge;
/*--------------------------------------------------------------------
Constructor
bridge: The parent bridge object (provides access to bridge methods)
--------------------------------------------------------------------*/
GetBindingsMethodNames::GetBindingsMethodNames(BrowserBridge& bridge) : m_bridge{bridge}, JSFunction{"GetBindingsMethodNames", [&]() {
return getMethodNames();
}} {
} //GetBindingsMethodNames::GetBindingsMethodNames
/*--------------------------------------------------------------------
Get the names of the methods supported by the parent browser
return: The supported method names
--------------------------------------------------------------------*/
std::unique_ptr<WrappedValue> GetBindingsMethodNames::getMethodNames() const {
return std::make_unique<WrappedValue>(m_bridge.getMethodNames());
} //GetBindingsMethodNames::getMethodNames