Files
speckle-cpp-connectors/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetBindingsMethodNames.cpp
T
Ralph Wessel 9c6680399c Interim commit - BrowserBridge in development
Added Browser JS interface including:
- JS interfaces
- Bridge class
- Bridge functions
Added JSBaseTransport (in progress)
'GetCallResult' to be implemented
2024-08-15 23:00:42 +01:00

28 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::interface::browser;
using namespace speckle::interface::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