Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7393fac437 | |||
| 997545b6ac | |||
| ea3152d942 | |||
| 0b00af7d1d | |||
| c68d2f3e25 | |||
| 9acc058f07 | |||
| c14e3ac095 | |||
| 83f38e946e | |||
| 09bf8f9ffa | |||
| 7aa4cc9a51 | |||
| f22b19993a |
@@ -106,7 +106,11 @@
|
|||||||
<ClCompile Include="Connector\Interface\Browser\Bridge\Config\Arg\ConnectorConfig.cpp" />
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Config\Arg\ConnectorConfig.cpp" />
|
||||||
<ClCompile Include="Connector\Interface\Browser\Bridge\Config\ConfigBridge.cpp" />
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Config\ConfigBridge.cpp" />
|
||||||
<ClCompile Include="Connector\Interface\Browser\Bridge\Config\GetConfig.cpp" />
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Config\GetConfig.cpp" />
|
||||||
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Config\GetIsDevMode.cpp" />
|
||||||
<ClCompile Include="Connector\Interface\Browser\Bridge\Config\UpdateConfig.cpp" />
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Config\UpdateConfig.cpp" />
|
||||||
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Send\Arg\SendFilter.cpp" />
|
||||||
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Send\GetSendFilters.cpp" />
|
||||||
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Send\Send.cpp" />
|
||||||
<ClCompile Include="Connector\Interface\Browser\Bridge\Send\SendBridge.cpp" />
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Send\SendBridge.cpp" />
|
||||||
<ClCompile Include="Connector\Interface\Browser\Bridge\Test\Arg\SayHiArg.cpp" />
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Test\Arg\SayHiArg.cpp" />
|
||||||
<ClCompile Include="Connector\Interface\Browser\Bridge\Test\GetComplexType.cpp" />
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Test\GetComplexType.cpp" />
|
||||||
@@ -134,7 +138,11 @@
|
|||||||
<ClInclude Include="Connector\Interface\Browser\Bridge\Config\Arg\ConnectorConfig.h" />
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Config\Arg\ConnectorConfig.h" />
|
||||||
<ClInclude Include="Connector\Interface\Browser\Bridge\Config\ConfigBridge.h" />
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Config\ConfigBridge.h" />
|
||||||
<ClInclude Include="Connector\Interface\Browser\Bridge\Config\GetConfig.h" />
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Config\GetConfig.h" />
|
||||||
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Config\GetIsDevMode.h" />
|
||||||
<ClInclude Include="Connector\Interface\Browser\Bridge\Config\UpdateConfig.h" />
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Config\UpdateConfig.h" />
|
||||||
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Send\Arg\SendFilter.h" />
|
||||||
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Send\GetSendFilters.h" />
|
||||||
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Send\Send.h" />
|
||||||
<ClInclude Include="Connector\Interface\Browser\Bridge\Send\SendBridge.h" />
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Send\SendBridge.h" />
|
||||||
<ClInclude Include="Connector\Interface\Browser\Bridge\Test\Arg\SayHiArg.h" />
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Test\Arg\SayHiArg.h" />
|
||||||
<ClInclude Include="Connector\Interface\Browser\Bridge\Test\GetComplexType.h" />
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Test\GetComplexType.h" />
|
||||||
|
|||||||
@@ -53,6 +53,9 @@
|
|||||||
<Filter Include="Connector\Interface\Browser\Bridge\Send">
|
<Filter Include="Connector\Interface\Browser\Bridge\Send">
|
||||||
<UniqueIdentifier>{2b87cf11-87cd-435f-ab24-42170c2e657e}</UniqueIdentifier>
|
<UniqueIdentifier>{2b87cf11-87cd-435f-ab24-42170c2e657e}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="Connector\Interface\Browser\Bridge\Send\Arg">
|
||||||
|
<UniqueIdentifier>{3bc97363-0091-4f84-a5f7-085193bad850}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="RFIX.win\Connector.rc2">
|
<None Include="RFIX.win\Connector.rc2">
|
||||||
@@ -149,6 +152,16 @@
|
|||||||
<ClCompile Include="Connector\Interface\Browser\Bridge\Send\SendBridge.cpp">
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Send\SendBridge.cpp">
|
||||||
<Filter>Connector\Interface\Browser\Bridge\Send</Filter>
|
<Filter>Connector\Interface\Browser\Bridge\Send</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Config\GetIsDevMode.cpp" />
|
||||||
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Send\Send.cpp">
|
||||||
|
<Filter>Connector\Interface\Browser\Bridge\Send</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Send\GetSendFilters.cpp">
|
||||||
|
<Filter>Connector\Interface\Browser\Bridge\Send</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Connector\Interface\Browser\Bridge\Send\Arg\SendFilter.cpp">
|
||||||
|
<Filter>Connector\Interface\Browser\Bridge\Send\Arg</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="Connector\ConnectorResource.h">
|
<ClInclude Include="Connector\ConnectorResource.h">
|
||||||
@@ -232,5 +245,15 @@
|
|||||||
<ClInclude Include="Connector\Interface\Browser\Bridge\Send\SendBridge.h">
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Send\SendBridge.h">
|
||||||
<Filter>Connector\Interface\Browser\Bridge\Send</Filter>
|
<Filter>Connector\Interface\Browser\Bridge\Send</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Config\GetIsDevMode.h" />
|
||||||
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Send\Send.h">
|
||||||
|
<Filter>Connector\Interface\Browser\Bridge\Send</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Send\GetSendFilters.h">
|
||||||
|
<Filter>Connector\Interface\Browser\Bridge\Send</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Connector\Interface\Browser\Bridge\Send\Arg\SendFilter.h">
|
||||||
|
<Filter>Connector\Interface\Browser\Bridge\Send\Arg</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -44,6 +44,10 @@
|
|||||||
21B67CF72C78D4DE00FD64FC /* GetComplexType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 21B67CF52C78D4DD00FD64FC /* GetComplexType.cpp */; };
|
21B67CF72C78D4DE00FD64FC /* GetComplexType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 21B67CF52C78D4DD00FD64FC /* GetComplexType.cpp */; };
|
||||||
21D0BD602C89BFEA0077E104 /* SendBridge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 21D0BD5B2C89BFEA0077E104 /* SendBridge.cpp */; };
|
21D0BD602C89BFEA0077E104 /* SendBridge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 21D0BD5B2C89BFEA0077E104 /* SendBridge.cpp */; };
|
||||||
21D0BD672C89D7410077E104 /* AccountTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 21D0BD642C89D7400077E104 /* AccountTests.cpp */; };
|
21D0BD672C89D7410077E104 /* AccountTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 21D0BD642C89D7400077E104 /* AccountTests.cpp */; };
|
||||||
|
21D0BD6A2C8A0DB40077E104 /* GetIsDevMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 21D0BD682C8A0DB40077E104 /* GetIsDevMode.cpp */; };
|
||||||
|
21D0BD8E2C8EE4490077E104 /* Send.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 21D0BD8D2C8EE4490077E104 /* Send.cpp */; };
|
||||||
|
21D0BD972C8F13F30077E104 /* GetSendFilters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 21D0BD962C8F13F30077E104 /* GetSendFilters.cpp */; };
|
||||||
|
21D0BD9B2C8F154B0077E104 /* SendFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 21D0BD982C8F154B0077E104 /* SendFilter.cpp */; };
|
||||||
21D1E9AD2BF14AF200957EAA /* BIMData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21D1E9152BF14AEC00957EAA /* BIMData.framework */; };
|
21D1E9AD2BF14AF200957EAA /* BIMData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21D1E9152BF14AEC00957EAA /* BIMData.framework */; };
|
||||||
21D1E9AE2BF14AF200957EAA /* TeamworkPortalServerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21D1E9162BF14AEC00957EAA /* TeamworkPortalServerClient.framework */; };
|
21D1E9AE2BF14AF200957EAA /* TeamworkPortalServerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21D1E9162BF14AEC00957EAA /* TeamworkPortalServerClient.framework */; };
|
||||||
21D1E9AF2BF14AF200957EAA /* GDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21D1E9172BF14AEC00957EAA /* GDL.framework */; };
|
21D1E9AF2BF14AF200957EAA /* GDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21D1E9172BF14AEC00957EAA /* GDL.framework */; };
|
||||||
@@ -309,6 +313,14 @@
|
|||||||
21D0BD5B2C89BFEA0077E104 /* SendBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SendBridge.cpp; sourceTree = "<group>"; };
|
21D0BD5B2C89BFEA0077E104 /* SendBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SendBridge.cpp; sourceTree = "<group>"; };
|
||||||
21D0BD5C2C89BFEA0077E104 /* SendBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SendBridge.h; sourceTree = "<group>"; };
|
21D0BD5C2C89BFEA0077E104 /* SendBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SendBridge.h; sourceTree = "<group>"; };
|
||||||
21D0BD642C89D7400077E104 /* AccountTests.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = AccountTests.cpp; sourceTree = "<group>"; };
|
21D0BD642C89D7400077E104 /* AccountTests.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = AccountTests.cpp; sourceTree = "<group>"; };
|
||||||
|
21D0BD682C8A0DB40077E104 /* GetIsDevMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetIsDevMode.cpp; sourceTree = "<group>"; };
|
||||||
|
21D0BD692C8A0DB40077E104 /* GetIsDevMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GetIsDevMode.h; sourceTree = "<group>"; };
|
||||||
|
21D0BD8A2C8EE4490077E104 /* Send.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Send.h; sourceTree = "<group>"; };
|
||||||
|
21D0BD8D2C8EE4490077E104 /* Send.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Send.cpp; sourceTree = "<group>"; };
|
||||||
|
21D0BD952C8F13F30077E104 /* GetSendFilters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GetSendFilters.h; sourceTree = "<group>"; };
|
||||||
|
21D0BD962C8F13F30077E104 /* GetSendFilters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetSendFilters.cpp; sourceTree = "<group>"; };
|
||||||
|
21D0BD982C8F154B0077E104 /* SendFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SendFilter.cpp; sourceTree = "<group>"; };
|
||||||
|
21D0BD992C8F154B0077E104 /* SendFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SendFilter.h; sourceTree = "<group>"; };
|
||||||
21D1E9152BF14AEC00957EAA /* BIMData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BIMData.framework; path = "../Archicad 27/Support/Frameworks/BIMData.framework"; sourceTree = "<group>"; };
|
21D1E9152BF14AEC00957EAA /* BIMData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BIMData.framework; path = "../Archicad 27/Support/Frameworks/BIMData.framework"; sourceTree = "<group>"; };
|
||||||
21D1E9162BF14AEC00957EAA /* TeamworkPortalServerClient.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TeamworkPortalServerClient.framework; path = "../Archicad 27/Support/Frameworks/TeamworkPortalServerClient.framework"; sourceTree = "<group>"; };
|
21D1E9162BF14AEC00957EAA /* TeamworkPortalServerClient.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TeamworkPortalServerClient.framework; path = "../Archicad 27/Support/Frameworks/TeamworkPortalServerClient.framework"; sourceTree = "<group>"; };
|
||||||
21D1E9172BF14AEC00957EAA /* GDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GDL.framework; path = "../Archicad 27/Support/Frameworks/GDL.framework"; sourceTree = "<group>"; };
|
21D1E9172BF14AEC00957EAA /* GDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GDL.framework; path = "../Archicad 27/Support/Frameworks/GDL.framework"; sourceTree = "<group>"; };
|
||||||
@@ -976,12 +988,26 @@
|
|||||||
21D0BD5D2C89BFEA0077E104 /* Send */ = {
|
21D0BD5D2C89BFEA0077E104 /* Send */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
21D0BD9A2C8F154B0077E104 /* Arg */,
|
||||||
|
21D0BD962C8F13F30077E104 /* GetSendFilters.cpp */,
|
||||||
|
21D0BD952C8F13F30077E104 /* GetSendFilters.h */,
|
||||||
|
21D0BD8D2C8EE4490077E104 /* Send.cpp */,
|
||||||
|
21D0BD8A2C8EE4490077E104 /* Send.h */,
|
||||||
21D0BD5B2C89BFEA0077E104 /* SendBridge.cpp */,
|
21D0BD5B2C89BFEA0077E104 /* SendBridge.cpp */,
|
||||||
21D0BD5C2C89BFEA0077E104 /* SendBridge.h */,
|
21D0BD5C2C89BFEA0077E104 /* SendBridge.h */,
|
||||||
);
|
);
|
||||||
path = Send;
|
path = Send;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
21D0BD9A2C8F154B0077E104 /* Arg */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
21D0BD982C8F154B0077E104 /* SendFilter.cpp */,
|
||||||
|
21D0BD992C8F154B0077E104 /* SendFilter.h */,
|
||||||
|
);
|
||||||
|
path = Arg;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
21D1EA472BF14B6C00957EAA /* Archicad */ = {
|
21D1EA472BF14B6C00957EAA /* Archicad */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@@ -1085,6 +1111,8 @@
|
|||||||
21F69FB52C762EF0008B6A06 /* ConfigBridge.h */,
|
21F69FB52C762EF0008B6A06 /* ConfigBridge.h */,
|
||||||
21F69FB62C762EF0008B6A06 /* GetConfig.cpp */,
|
21F69FB62C762EF0008B6A06 /* GetConfig.cpp */,
|
||||||
21F69FB72C762EF0008B6A06 /* GetConfig.h */,
|
21F69FB72C762EF0008B6A06 /* GetConfig.h */,
|
||||||
|
21D0BD682C8A0DB40077E104 /* GetIsDevMode.cpp */,
|
||||||
|
21D0BD692C8A0DB40077E104 /* GetIsDevMode.h */,
|
||||||
21F69FBD2C7630B3008B6A06 /* UpdateConfig.cpp */,
|
21F69FBD2C7630B3008B6A06 /* UpdateConfig.cpp */,
|
||||||
21F69FBE2C7630B3008B6A06 /* UpdateConfig.h */,
|
21F69FBE2C7630B3008B6A06 /* UpdateConfig.h */,
|
||||||
);
|
);
|
||||||
@@ -1299,11 +1327,15 @@
|
|||||||
21B67CE32C78D1FB00FD64FC /* SayHiArg.cpp in Sources */,
|
21B67CE32C78D1FB00FD64FC /* SayHiArg.cpp in Sources */,
|
||||||
21F69FBB2C762EF0008B6A06 /* ConfigBridge.cpp in Sources */,
|
21F69FBB2C762EF0008B6A06 /* ConfigBridge.cpp in Sources */,
|
||||||
21F69F8A2C70D2C4008B6A06 /* AccountBridge.cpp in Sources */,
|
21F69F8A2C70D2C4008B6A06 /* AccountBridge.cpp in Sources */,
|
||||||
|
21D0BD9B2C8F154B0077E104 /* SendFilter.cpp in Sources */,
|
||||||
|
21D0BD8E2C8EE4490077E104 /* Send.cpp in Sources */,
|
||||||
21B67CF72C78D4DE00FD64FC /* GetComplexType.cpp in Sources */,
|
21B67CF72C78D4DE00FD64FC /* GetComplexType.cpp in Sources */,
|
||||||
21B67CAE2C77329800FD64FC /* GetSourceApplicationVersion.cpp in Sources */,
|
21B67CAE2C77329800FD64FC /* GetSourceApplicationVersion.cpp in Sources */,
|
||||||
21B67CC32C77649F00FD64FC /* GetDocumentState.cpp in Sources */,
|
21B67CC32C77649F00FD64FC /* GetDocumentState.cpp in Sources */,
|
||||||
21D0BD602C89BFEA0077E104 /* SendBridge.cpp in Sources */,
|
21D0BD602C89BFEA0077E104 /* SendBridge.cpp in Sources */,
|
||||||
|
21D0BD972C8F13F30077E104 /* GetSendFilters.cpp in Sources */,
|
||||||
21B67CAC2C77329800FD64FC /* BaseBridge.cpp in Sources */,
|
21B67CAC2C77329800FD64FC /* BaseBridge.cpp in Sources */,
|
||||||
|
21D0BD6A2C8A0DB40077E104 /* GetIsDevMode.cpp in Sources */,
|
||||||
210CC8832C80E6A300610F58 /* TriggerEvent.cpp in Sources */,
|
210CC8832C80E6A300610F58 /* TriggerEvent.cpp in Sources */,
|
||||||
21B67CEB2C78D27200FD64FC /* DocumentInfo.cpp in Sources */,
|
21B67CEB2C78D27200FD64FC /* DocumentInfo.cpp in Sources */,
|
||||||
21B67CB92C774BFA00FD64FC /* GetConnectorVersion.cpp in Sources */,
|
21B67CB92C774BFA00FD64FC /* GetConnectorVersion.cpp in Sources */,
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ namespace {
|
|||||||
class ConnectorInstance : public ConnectorAddon {
|
class ConnectorInstance : public ConnectorAddon {
|
||||||
public:
|
public:
|
||||||
ConnectorInstance(const String& name) : ConnectorAddon{name} {
|
ConnectorInstance(const String& name) : ConnectorAddon{name} {
|
||||||
add(std::make_shared<ConnectorMenu>());
|
add<ConnectorMenu>();
|
||||||
add(std::make_shared<ConnectorPalette>());
|
add<ConnectorPalette>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: Functions (const)
|
// MARK: Functions (const)
|
||||||
@@ -107,8 +107,8 @@ ConnectorAddon* connector::connector() {
|
|||||||
The following is the C interface for the plugin to Archicad as specified by the API
|
The following is the C interface for the plugin to Archicad as specified by the API
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ACAPinc.h"
|
#include <ACAPinc.h>
|
||||||
#include "APIdefs_Registration.h"
|
#include <APIdefs_Registration.h>
|
||||||
|
|
||||||
/*--------------------------------------------------------------------
|
/*--------------------------------------------------------------------
|
||||||
Confirm that the plugin is able to run in the current environment
|
Confirm that the plugin is able to run in the current environment
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef CONNECTOR_INTERFACE_BRIDGE_CONNECTOR_CONFIG
|
#ifndef CONNECTOR_INTERFACE_BRIDGE_DOCUMENT_INFO
|
||||||
#define CONNECTOR_INTERFACE_BRIDGE_CONNECTOR_CONFIG
|
#define CONNECTOR_INTERFACE_BRIDGE_DOCUMENT_INFO
|
||||||
|
|
||||||
#include "Active/Serialise/Package/Package.h"
|
#include "Active/Serialise/Package/Package.h"
|
||||||
#include "Speckle/Utility/String.h"
|
#include "Speckle/Utility/String.h"
|
||||||
@@ -58,4 +58,4 @@ namespace connector::interfac::browser::bridge {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //CONNECTOR_INTERFACE_BRIDGE_CONNECTOR_CONFIG
|
#endif //CONNECTOR_INTERFACE_BRIDGE_DOCUMENT_INFO
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "Connector/Interface/Browser/Bridge/Config/Arg/ConnectorConfig.h"
|
#include "Connector/Interface/Browser/Bridge/Config/Arg/ConnectorConfig.h"
|
||||||
|
|
||||||
#include "Active/Serialise/Item/Wrapper/ValueWrap.h"
|
#include "Active/Serialise/Item/Wrapper/ValueWrap.h"
|
||||||
#include "Active/Serialise/Package/PackageWrap.h"
|
#include "Active/Serialise/Package/Wrapper/PackageWrap.h"
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include "Connector/Interface/Browser/Bridge/Config/GetConfig.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"
|
||||||
|
#include "Connector/Interface/Browser/Bridge/Config/GetIsDevMode.h"
|
||||||
|
|
||||||
using namespace connector::interfac::browser::bridge;
|
using namespace connector::interfac::browser::bridge;
|
||||||
|
|
||||||
@@ -12,4 +13,5 @@ ConfigBridge::ConfigBridge() : BrowserBridge{"configBinding"} {
|
|||||||
//Add bridge methods
|
//Add bridge methods
|
||||||
addMethod<GetConfig>();
|
addMethod<GetConfig>();
|
||||||
addMethod<UpdateConfig>();
|
addMethod<UpdateConfig>();
|
||||||
|
addMethod<GetIsDevMode>();
|
||||||
} //ConfigBridge::ConfigBridge
|
} //ConfigBridge::ConfigBridge
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "Connector/Interface/Browser/Bridge/Config/GetConfig.h"
|
#include "Connector/Interface/Browser/Bridge/Config/GetConfig.h"
|
||||||
|
|
||||||
#include "Active/Serialise/CargoHold.h"
|
#include "Active/Serialise/CargoHold.h"
|
||||||
#include "Active/Serialise/Package/PackageWrap.h"
|
#include "Active/Serialise/Package/Wrapper/PackageWrap.h"
|
||||||
#include "Connector/Interface/Browser/Bridge/Config/Arg/ConnectorConfig.h"
|
#include "Connector/Interface/Browser/Bridge/Config/Arg/ConnectorConfig.h"
|
||||||
|
|
||||||
using namespace active::serialise;
|
using namespace active::serialise;
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ namespace connector::interfac::browser::bridge {
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Constructor
|
Constructor
|
||||||
@param bridge The parent bridge object (provides access to bridge methods)
|
|
||||||
*/
|
*/
|
||||||
GetConfig();
|
GetConfig();
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
#include "Connector/Interface/Browser/Bridge/Config/GetIsDevMode.h"
|
||||||
|
|
||||||
|
#include "Active/Serialise/CargoHold.h"
|
||||||
|
#include "Active/Serialise/Item/Wrapper/ValueWrap.h"
|
||||||
|
|
||||||
|
using namespace active::serialise;
|
||||||
|
using namespace connector::interfac::browser::bridge;
|
||||||
|
using namespace speckle::utility;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
///Return type for retrieving the current configuration
|
||||||
|
using WrappedValue = CargoHold<ValueWrap<bool>, bool>;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------
|
||||||
|
Default constructor
|
||||||
|
--------------------------------------------------------------------*/
|
||||||
|
GetIsDevMode::GetIsDevMode() : BridgeMethod{"GetIsDevMode", [&]() {
|
||||||
|
return run();
|
||||||
|
}} {}
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------
|
||||||
|
Get the DEBUG mode
|
||||||
|
|
||||||
|
return: true for DEBUG, false otherwise
|
||||||
|
--------------------------------------------------------------------*/
|
||||||
|
std::unique_ptr<Cargo> GetIsDevMode::run() const {
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
bool value = true;
|
||||||
|
#else
|
||||||
|
bool value = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return std::make_unique<WrappedValue>(value);
|
||||||
|
} //GetIsDevMode::run
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
#ifndef CONNECTOR_INTERFACE_BRIDGE_GET_IS_DEV_MODE
|
||||||
|
#define CONNECTOR_INTERFACE_BRIDGE_GET_IS_DEV_MODE
|
||||||
|
|
||||||
|
#include "Speckle/Interface/Browser/Bridge/BridgeMethod.h"
|
||||||
|
|
||||||
|
namespace connector::interfac::browser::bridge {
|
||||||
|
|
||||||
|
/*!
|
||||||
|
JS Function class to retrieve IsDebugMode
|
||||||
|
*/
|
||||||
|
class GetIsDevMode : public speckle::interfac::browser::bridge::BridgeMethod<void, active::serialise::Cargo> {
|
||||||
|
public:
|
||||||
|
|
||||||
|
// MARK: - Constructors
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Constructor
|
||||||
|
*/
|
||||||
|
GetIsDevMode();
|
||||||
|
|
||||||
|
// MARK: - Functions (const)
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Get the DEBUG mode
|
||||||
|
@return true for DEBUG, false otherwise
|
||||||
|
*/
|
||||||
|
std::unique_ptr<active::serialise::Cargo> run() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif //CONNECTOR_INTERFACE_BRIDGE_GET_IS_DEV_MODE
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "Connector/Interface/Browser/Bridge/Config/UpdateConfig.h"
|
#include "Connector/Interface/Browser/Bridge/Config/UpdateConfig.h"
|
||||||
|
|
||||||
#include "Active/Serialise/CargoHold.h"
|
#include "Active/Serialise/CargoHold.h"
|
||||||
#include "Active/Serialise/Package/PackageWrap.h"
|
#include "Active/Serialise/Package/Wrapper/PackageWrap.h"
|
||||||
|
|
||||||
using namespace active::serialise;
|
using namespace active::serialise;
|
||||||
using namespace connector::interfac::browser::bridge;
|
using namespace connector::interfac::browser::bridge;
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
#include "Connector/Interface/Browser/Bridge/Send/Arg/SendFilter.h"
|
||||||
|
|
||||||
|
#include "Active/Serialise/Item/Wrapper/ValueWrap.h"
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
|
||||||
|
using namespace active::serialise;
|
||||||
|
using namespace connector::interfac::browser::bridge;
|
||||||
|
using namespace speckle::utility;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
///Serialisation fields
|
||||||
|
enum FieldIndex {
|
||||||
|
nameID,
|
||||||
|
summaryID,
|
||||||
|
defaultID,
|
||||||
|
};
|
||||||
|
|
||||||
|
///Serialisation field IDs
|
||||||
|
static std::array fieldID = {
|
||||||
|
Identity{"name"},
|
||||||
|
Identity{"summary"},
|
||||||
|
Identity{"isDefault"},
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------
|
||||||
|
Fill an inventory with the package items
|
||||||
|
|
||||||
|
inventory: The inventory to receive the package items
|
||||||
|
|
||||||
|
return: True if the package has added items to the inventory
|
||||||
|
--------------------------------------------------------------------*/
|
||||||
|
bool SendFilter::fillInventory(Inventory& inventory) const {
|
||||||
|
using enum Entry::Type;
|
||||||
|
inventory.merge(Inventory{
|
||||||
|
{
|
||||||
|
{ fieldID[nameID], nameID, element },
|
||||||
|
{ fieldID[summaryID], summaryID, element },
|
||||||
|
{ fieldID[defaultID], defaultID, element },
|
||||||
|
},
|
||||||
|
}.withType(&typeid(SendFilter)));
|
||||||
|
return true;
|
||||||
|
} //SendFilter::fillInventory
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------
|
||||||
|
Get the specified cargo
|
||||||
|
|
||||||
|
item: The inventory item to retrieve
|
||||||
|
|
||||||
|
return: The requested cargo (nullptr on failure)
|
||||||
|
--------------------------------------------------------------------*/
|
||||||
|
Cargo::Unique SendFilter::getCargo(const Inventory::Item& item) const {
|
||||||
|
if (item.ownerType != &typeid(SendFilter))
|
||||||
|
return nullptr;
|
||||||
|
using namespace active::serialise;
|
||||||
|
switch (item.index) {
|
||||||
|
case nameID:
|
||||||
|
return std::make_unique<ValueWrap<String>>(name);
|
||||||
|
case summaryID:
|
||||||
|
return std::make_unique<ValueWrap<String>>(summary);
|
||||||
|
case defaultID:
|
||||||
|
return std::make_unique<ValueWrap<bool>>(isDefault);
|
||||||
|
default:
|
||||||
|
return nullptr; //Requested an unknown index
|
||||||
|
}
|
||||||
|
} //SendFilter::getCargo
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------
|
||||||
|
Set to the default package content
|
||||||
|
--------------------------------------------------------------------*/
|
||||||
|
void SendFilter::setDefault() {
|
||||||
|
name.clear();
|
||||||
|
summary.clear();
|
||||||
|
isDefault = false;
|
||||||
|
} //SendFilter::setDefault
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
#ifndef CONNECTOR_INTERFACE_BRIDGE_SEND_FILTER
|
||||||
|
#define CONNECTOR_INTERFACE_BRIDGE_SEND_FILTER
|
||||||
|
|
||||||
|
#include "Active/Serialise/Package/Package.h"
|
||||||
|
#include "Active/Utility/Cloner.h"
|
||||||
|
#include "Speckle/Utility/String.h"
|
||||||
|
|
||||||
|
namespace connector::interfac::browser::bridge {
|
||||||
|
|
||||||
|
/*!
|
||||||
|
A connector send filter
|
||||||
|
*/
|
||||||
|
class SendFilter : public active::serialise::Package, public active::utility::Cloner {
|
||||||
|
public:
|
||||||
|
|
||||||
|
// MARK: - Types
|
||||||
|
|
||||||
|
using base = active::serialise::Package;
|
||||||
|
|
||||||
|
// MARK: - Constructors
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Default constructor
|
||||||
|
@param nm The filter name
|
||||||
|
@param sum A summary
|
||||||
|
@param isDef True if this is the default filter
|
||||||
|
*/
|
||||||
|
SendFilter(const speckle::utility::String& nm = {}, const speckle::utility::String& sum = {}, bool isDef = false) :
|
||||||
|
name{nm}, summary{sum}, isDefault{isDef} {}
|
||||||
|
/*!
|
||||||
|
Record cloning
|
||||||
|
@return A clone of this record
|
||||||
|
*/
|
||||||
|
virtual SendFilter* clonePtr() const override { return new SendFilter(*this); };
|
||||||
|
|
||||||
|
// MARK: - Public variables (NB: Assuming to class invariants or overrides for this data, so making public for simplicity)
|
||||||
|
|
||||||
|
///The filter name
|
||||||
|
speckle::utility::String name;
|
||||||
|
///A summary
|
||||||
|
speckle::utility::String summary;
|
||||||
|
///True if this is the default filter
|
||||||
|
bool isDefault = false;
|
||||||
|
|
||||||
|
// MARK: - Serialisation
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Fill an inventory with the package items
|
||||||
|
@param inventory The inventory to receive the package items
|
||||||
|
@return True if the package has added items to the inventory
|
||||||
|
*/
|
||||||
|
bool fillInventory(active::serialise::Inventory& inventory) const override;
|
||||||
|
/*!
|
||||||
|
Get the specified cargo
|
||||||
|
@param item The inventory item to retrieve
|
||||||
|
@return The requested cargo (nullptr on failure)
|
||||||
|
*/
|
||||||
|
Cargo::Unique getCargo(const active::serialise::Inventory::Item& item) const override;
|
||||||
|
/*!
|
||||||
|
Set to the default package content
|
||||||
|
*/
|
||||||
|
void setDefault() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif //CONNECTOR_INTERFACE_BRIDGE_SEND_FILTER
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
#include "Connector/Interface/Browser/Bridge/Send/GetSendFilters.h"
|
||||||
|
|
||||||
|
#include "Active/Container/Vector.h"
|
||||||
|
#include "Active/Serialise/CargoHold.h"
|
||||||
|
#include "Active/Serialise/Package/Wrapper/ContainerWrap.h"
|
||||||
|
#include "Active/Serialise/Package/Wrapper/PackageWrap.h"
|
||||||
|
#include "Connector/Interface/Browser/Bridge/Send/Arg/SendFilter.h"
|
||||||
|
|
||||||
|
using namespace active::container;
|
||||||
|
using namespace active::serialise;
|
||||||
|
using namespace connector::interfac::browser::bridge;
|
||||||
|
using namespace speckle::utility;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
using WrappedValue = active::serialise::CargoHold<ContainerWrap<Vector, SendFilter>, Vector<SendFilter>>;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------
|
||||||
|
Default constructor
|
||||||
|
--------------------------------------------------------------------*/
|
||||||
|
GetSendFilters::GetSendFilters() : BridgeMethod{"GetSendFilters", [&]() {
|
||||||
|
return run();
|
||||||
|
}} {}
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------
|
||||||
|
Get the send filters
|
||||||
|
|
||||||
|
return: The send filters
|
||||||
|
--------------------------------------------------------------------*/
|
||||||
|
std::unique_ptr<Cargo> GetSendFilters::run() const {
|
||||||
|
Vector<SendFilter> filters;
|
||||||
|
///TODO: Get real filters
|
||||||
|
return std::make_unique<WrappedValue>(filters);
|
||||||
|
} //GetSendFilters::run
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
#ifndef CONNECTOR_INTERFACE_BRIDGE_GET_SEND_FILTERS
|
||||||
|
#define CONNECTOR_INTERFACE_BRIDGE_GET_SEND_FILTERS
|
||||||
|
|
||||||
|
#include "Active/Serialise/CargoHold.h"
|
||||||
|
#include "Speckle/Interface/Browser/Bridge/BridgeMethod.h"
|
||||||
|
|
||||||
|
namespace connector::interfac::browser::bridge {
|
||||||
|
|
||||||
|
class ConnectorConfig;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
JS Function class to retrieve the send filters
|
||||||
|
*/
|
||||||
|
class GetSendFilters : public speckle::interfac::browser::bridge::BridgeMethod<void, active::serialise::Cargo> {
|
||||||
|
public:
|
||||||
|
|
||||||
|
// MARK: - Constructors
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Constructor
|
||||||
|
@param bridge The parent bridge object (provides access to bridge methods)
|
||||||
|
*/
|
||||||
|
GetSendFilters();
|
||||||
|
|
||||||
|
// MARK: - Functions (const)
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Get the send filters
|
||||||
|
@return The send filters
|
||||||
|
*/
|
||||||
|
std::unique_ptr<active::serialise::Cargo> run() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif //CONNECTOR_INTERFACE_BRIDGE_GET_SEND_FILTERS
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#include "Connector/Interface/Browser/Bridge/Send/Send.h"
|
||||||
|
|
||||||
|
#include "Active/Serialise/CargoHold.h"
|
||||||
|
#include "Active/Serialise/Package/Wrapper/PackageWrap.h"
|
||||||
|
|
||||||
|
using namespace active::serialise;
|
||||||
|
using namespace connector::interfac::browser::bridge;
|
||||||
|
using namespace speckle::utility;
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------
|
||||||
|
Default constructor
|
||||||
|
--------------------------------------------------------------------*/
|
||||||
|
Send::Send() : BridgeMethod{"Send", [&](UpdateArgs args) {
|
||||||
|
run(args);
|
||||||
|
}} {}
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------
|
||||||
|
Send a specified model
|
||||||
|
|
||||||
|
modelCardID: The ID of the madel to send
|
||||||
|
--------------------------------------------------------------------*/
|
||||||
|
void Send::run(const String& modelCardID) const {
|
||||||
|
///TODO: Send the requested model
|
||||||
|
} //Send::run
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
#ifndef CONNECTOR_INTERFACE_BRIDGE_SEND
|
||||||
|
#define CONNECTOR_INTERFACE_BRIDGE_SEND
|
||||||
|
|
||||||
|
#include "Active/Serialise/CargoHold.h"
|
||||||
|
#include "Connector/Interface/Browser/Bridge/Config/Arg/ConnectorConfig.h"
|
||||||
|
#include "Speckle/Interface/Browser/Bridge/BridgeMethod.h"
|
||||||
|
|
||||||
|
namespace connector::interfac::browser::bridge {
|
||||||
|
|
||||||
|
class ConnectorConfig;
|
||||||
|
|
||||||
|
///Argument for a JS call to update the configuration
|
||||||
|
using UpdateArgs = speckle::interfac::browser::bridge::JSArgType<speckle::utility::String>;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
JS Function class to retrieve the names of the methods supported by the bridge
|
||||||
|
*/
|
||||||
|
class Send : public speckle::interfac::browser::bridge::BridgeMethod<UpdateArgs, void> {
|
||||||
|
public:
|
||||||
|
|
||||||
|
// MARK: - Constructors
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Constructor
|
||||||
|
@param bridge The parent bridge object (provides access to bridge methods)
|
||||||
|
*/
|
||||||
|
Send();
|
||||||
|
|
||||||
|
// MARK: - Functions (const)
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Send a specified model
|
||||||
|
@param modelCardID The ID of the madel to send
|
||||||
|
*/
|
||||||
|
void run(const speckle::utility::String& modelCardID) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif //CONNECTOR_INTERFACE_BRIDGE_SEND
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
#include "Connector/Interface/Browser/Bridge/Send/SendBridge.h"
|
#include "Connector/Interface/Browser/Bridge/Send/SendBridge.h"
|
||||||
|
|
||||||
|
#include "Connector/Interface/Browser/Bridge/Send/GetSendFilters.h"
|
||||||
|
#include "Connector/Interface/Browser/Bridge/Send/Send.h"
|
||||||
|
|
||||||
using namespace connector::interfac::browser::bridge;
|
using namespace connector::interfac::browser::bridge;
|
||||||
|
|
||||||
/*--------------------------------------------------------------------
|
/*--------------------------------------------------------------------
|
||||||
@@ -7,4 +10,6 @@ using namespace connector::interfac::browser::bridge;
|
|||||||
--------------------------------------------------------------------*/
|
--------------------------------------------------------------------*/
|
||||||
SendBridge::SendBridge() : BrowserBridge{"sendBinding"} {
|
SendBridge::SendBridge() : BrowserBridge{"sendBinding"} {
|
||||||
//Add bridge methods
|
//Add bridge methods
|
||||||
|
addMethod<GetSendFilters>();
|
||||||
|
addMethod<Send>();
|
||||||
} //SendBridge::SendBridge
|
} //SendBridge::SendBridge
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Active/Serialise/CargoHold.h"
|
#include "Active/Serialise/CargoHold.h"
|
||||||
#include "Active/Serialise/Item/Wrapper/ValueWrap.h"
|
#include "Active/Serialise/Item/Wrapper/ValueWrap.h"
|
||||||
#include "Active/Serialise/Package/PackageWrap.h"
|
#include "Active/Serialise/Package/Wrapper/PackageWrap.h"
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
|
|||||||
@@ -163,11 +163,11 @@ BrowserPalette::BrowserPalette() :
|
|||||||
Attach(*this);
|
Attach(*this);
|
||||||
BeginEventProcessing();
|
BeginEventProcessing();
|
||||||
//Install required connector bridges
|
//Install required connector bridges
|
||||||
install(std::make_shared<AccountBridge>());
|
install<AccountBridge>();
|
||||||
install(std::make_shared<BaseBridge>());
|
install<BaseBridge>();
|
||||||
install(std::make_shared<ConfigBridge>());
|
install<ConfigBridge>();
|
||||||
//install(std::make_shared<SendBridge>());
|
install<SendBridge>();
|
||||||
install(std::make_shared<TestBridge>());
|
install<TestBridge>();
|
||||||
InitBrowserControl();
|
InitBrowserControl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace connector {
|
|||||||
|
|
||||||
static const unsigned int versionMinor = 2;
|
static const unsigned int versionMinor = 2;
|
||||||
|
|
||||||
static const unsigned int versionPatch = 1;
|
static const unsigned int versionPatch = 2;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
#include "ActiveLibDoctest/TestingPlatforms.h"
|
#include "ActiveLibDoctest/TestingPlatforms.h"
|
||||||
|
|
||||||
#include "Active/Serialise/JSON/JSONTransport.h"
|
#include "Active/Serialise/JSON/JSONTransport.h"
|
||||||
#include "Active/Serialise/Package/PackageWrap.h"
|
#include "Active/Serialise/Package/Wrapper/PackageWrap.h"
|
||||||
#include "Active/Utility/BufferIn.h"
|
#include "Active/Utility/BufferIn.h"
|
||||||
|
#include "Active/Utility/BufferOut.h"
|
||||||
#include "Speckle/Record/Credentials/Account.h"
|
#include "Speckle/Record/Credentials/Account.h"
|
||||||
|
|
||||||
using namespace active::serialise;
|
using namespace active::serialise;
|
||||||
@@ -13,8 +14,7 @@ using namespace speckle::utility;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const char* accountJSON = "{\"id\":\"194B6E32061EB588B31D8CBC167DAAD8\",\"token\":\"547e30bcd0f0e377fe422019f388295e37c583a99f\",\"refreshToken\":\"7d23031b44856e768b5951161c9bc8378f663eefce\",\"isDefault\":false,\"isOnline\":false,\"serverInfo\":{\"name\":\"My new Speckle Server\",\"company\":\"Unknown Company\",\"version\":\"2.20.2-branch.testing.138676-e8c8291\",\"adminContact\":\"n/a\",\"description\":\"This a community deployment of a Speckle Server.\",\"frontend2\":true,\"url\":\"https://testing.speckle.dev\",\"migration\":null},\"userInfo\":{\"id\":\"e66694013f\",\"name\":\"oguzhan@speckle.systems\",\"email\":\"oguzhan@speckle.systems\",\"company\":null,\"avatar\":null,\"streams\":{\"totalCount\":2},\"commits\":{\"totalCount\":5}}}";
|
const char* accountJSON = "{\"id\":\"d4468f8d6f1e4c48a899518795326ea8\",\"token\":\"42986a57b3304baa8773f937aa0b7bcd42986a57b3\",\"refreshToken\":\"00b01c421de4404889f30947de1506d3440c476432\",\"isDefault\":true,\"isOnline\":false,\"serverInfo\":{\"name\":\"My new Speckle Server\",\"company\":\"Unknown Company\",\"version\":\"2.20.2-branch.testing.138676-e8c8291\",\"adminContact\":\"n/a\",\"description\":\"This a community deployment of a Speckle Server.\",\"frontend2\":true,\"url\":\"https://testing.speckle.dev\",\"migration\":null},\"userInfo\":{\"id\":\"00b01c421d\",\"name\":\"someone@speckle.systems\",\"email\":\"someone@speckle.systems\",\"company\":null,\"avatar\":null,\"streams\":{\"totalCount\":2},\"commits\":{\"totalCount\":5}}}";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -23,11 +23,19 @@ TEST_SUITE(TESTQ(AccountTests)) TEST_SUITE_OPEN
|
|||||||
//Test to receive account serialised as JSON from SQLite dbase
|
//Test to receive account serialised as JSON from SQLite dbase
|
||||||
TEST_CASE(TESTQ(testAccountReceive)) {
|
TEST_CASE(TESTQ(testAccountReceive)) {
|
||||||
Account account;
|
Account account;
|
||||||
|
JSONTransport transport;
|
||||||
try {
|
try {
|
||||||
JSONTransport().receive(PackageWrap{account}, Identity{}, String{accountJSON});
|
transport.receive(PackageWrap{account}, Identity{}, String{accountJSON});
|
||||||
} catch(...) {
|
} catch(...) {
|
||||||
FAIL_CHECK(TEST_MESSAGE(Account deserialisation failed));
|
FAIL_CHECK(TEST_MESSAGE(Account deserialisation failed));
|
||||||
}
|
}
|
||||||
|
String accountOut;
|
||||||
|
try {
|
||||||
|
transport.send(PackageWrap{account}, Identity{}, accountOut);
|
||||||
|
} catch(...) {
|
||||||
|
FAIL_CHECK(TEST_MESSAGE(Account serialisation failed));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_SUITE_CLOSE
|
TEST_SUITE_CLOSE
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "Active/Database/Storage/SQLiteEngine.h"
|
#include "Active/Database/Storage/SQLite/SQLiteEngine.h"
|
||||||
#include "Active/Database/Storage/Storage.h"
|
#include "Active/Database/Storage/Storage.h"
|
||||||
#include "Active/Serialise/JSON/JSONTransport.h"
|
#include "Active/Serialise/JSON/JSONTransport.h"
|
||||||
#include "Active/Setting/ValueSetting.h"
|
#include "Active/Setting/ValueSetting.h"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Active/Serialise/CargoHold.h"
|
#include "Active/Serialise/CargoHold.h"
|
||||||
#include "Active/Serialise/Null.h"
|
#include "Active/Serialise/Null.h"
|
||||||
#include "Active/Serialise/Package/PackageWrap.h"
|
#include "Active/Serialise/Package/Wrapper/PackageWrap.h"
|
||||||
#include "Speckle/Interface/Browser/Bridge/BrowserBridge.h"
|
#include "Speckle/Interface/Browser/Bridge/BrowserBridge.h"
|
||||||
#include "Speckle/Interface/Browser/Bridge/Functions/ErrorReport.h"
|
#include "Speckle/Interface/Browser/Bridge/Functions/ErrorReport.h"
|
||||||
#include "Speckle/Utility/Exception.h"
|
#include "Speckle/Utility/Exception.h"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "Active/Serialise/Inventory/Identity.h"
|
#include "Active/Serialise/Inventory/Identity.h"
|
||||||
#include "Active/Serialise/Item/Wrapper/ItemWrap.h"
|
#include "Active/Serialise/Item/Wrapper/ItemWrap.h"
|
||||||
#include "Active/Serialise/Package/NullPackage.h"
|
#include "Active/Serialise/Package/NullPackage.h"
|
||||||
#include "Active/Serialise/Package/PackageWrap.h"
|
#include "Active/Serialise/Package/Wrapper/PackageWrap.h"
|
||||||
#include "Speckle/Interface/Browser/JSBinding.h"
|
#include "Speckle/Interface/Browser/JSBinding.h"
|
||||||
#include "Speckle/Interface/Browser/NamedFunction.h"
|
#include "Speckle/Interface/Browser/NamedFunction.h"
|
||||||
#include "Speckle/Utility/String.h"
|
#include "Speckle/Utility/String.h"
|
||||||
|
|||||||
@@ -49,6 +49,13 @@ namespace speckle::interfac::browser {
|
|||||||
@return True if the object was successfully installed
|
@return True if the object was successfully installed
|
||||||
*/
|
*/
|
||||||
bool install(std::shared_ptr<JSObject<FunctionBinding>> object);
|
bool install(std::shared_ptr<JSObject<FunctionBinding>> object);
|
||||||
|
/*!
|
||||||
|
Install a JS function object
|
||||||
|
@return True if the object was successfully installed
|
||||||
|
@tparam T The type of object to install
|
||||||
|
*/
|
||||||
|
template<typename T> requires std::is_base_of_v<JSObject<FunctionBinding>, T>
|
||||||
|
bool install() { return install(std::make_shared<T>()); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#ifdef ARCHICAD
|
#ifdef ARCHICAD
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "Speckle/Record/Credentials/Account.h"
|
#include "Speckle/Record/Credentials/Account.h"
|
||||||
|
|
||||||
#include "Active/Serialise/Item/Wrapper/ValueWrap.h"
|
#include "Active/Serialise/Item/Wrapper/ValueWrap.h"
|
||||||
#include "Active/Serialise/Package/PackageWrap.h"
|
#include "Active/Serialise/Package/Wrapper/PackageWrap.h"
|
||||||
#include "Speckle/Utility/Guid.h"
|
#include "Speckle/Utility/Guid.h"
|
||||||
|
|
||||||
using namespace active::serialise;
|
using namespace active::serialise;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "Speckle/Record/Credentials/ServerInfo.h"
|
#include "Speckle/Record/Credentials/ServerInfo.h"
|
||||||
|
|
||||||
#include "Active/Serialise/Item/Wrapper/ValueWrap.h"
|
#include "Active/Serialise/Item/Wrapper/ValueOptionWrap.h"
|
||||||
#include "Active/Serialise/Package/PackageWrap.h"
|
#include "Active/Serialise/Package/Wrapper/PackageUnoWrap.h"
|
||||||
#include "Speckle/Utility/Guid.h"
|
#include "Speckle/Utility/Guid.h"
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
@@ -76,21 +76,21 @@ Cargo::Unique ServerInfo::getCargo(const Inventory::Item& item) const {
|
|||||||
using namespace active::serialise;
|
using namespace active::serialise;
|
||||||
switch (item.index) {
|
switch (item.index) {
|
||||||
case nameID:
|
case nameID:
|
||||||
return std::make_unique<ValueWrap<String>>(m_name);
|
return std::make_unique<StringWrap>(m_name);
|
||||||
case companyID:
|
case companyID:
|
||||||
return std::make_unique<ValueWrap<String>>(m_company);
|
return std::make_unique<StringOptWrap>(m_company);
|
||||||
case versionID:
|
case versionID:
|
||||||
return std::make_unique<ValueWrap<String>>(m_version);
|
return std::make_unique<StringOptWrap>(m_version);
|
||||||
case contactID:
|
case contactID:
|
||||||
return std::make_unique<ValueWrap<String>>(m_adminContact);
|
return std::make_unique<StringOptWrap>(m_adminContact);
|
||||||
case descriptionID:
|
case descriptionID:
|
||||||
return std::make_unique<ValueWrap<String>>(m_description);
|
return std::make_unique<StringOptWrap>(m_description);
|
||||||
case frontEndID:
|
case frontEndID:
|
||||||
return std::make_unique<ValueWrap<bool>>(m_frontend2);
|
return std::make_unique<ValueWrap<bool>>(m_frontend2);
|
||||||
case urlID:
|
case urlID:
|
||||||
return std::make_unique<ValueWrap<String>>(m_url);
|
return std::make_unique<StringOptWrap>(m_url);
|
||||||
case migrationID:
|
case migrationID:
|
||||||
return std::make_unique<PackageWrap>(m_migration);
|
return std::make_unique<PackageUnoWrap<ServerMigration>>(m_migration);
|
||||||
default:
|
default:
|
||||||
return nullptr; //Requested an unknown index
|
return nullptr; //Requested an unknown index
|
||||||
}
|
}
|
||||||
@@ -102,10 +102,23 @@ Cargo::Unique ServerInfo::getCargo(const Inventory::Item& item) const {
|
|||||||
--------------------------------------------------------------------*/
|
--------------------------------------------------------------------*/
|
||||||
void ServerInfo::setDefault() {
|
void ServerInfo::setDefault() {
|
||||||
m_name.clear();
|
m_name.clear();
|
||||||
m_company.clear();
|
|
||||||
m_version.clear();
|
|
||||||
m_adminContact.clear();
|
|
||||||
m_description.clear();
|
|
||||||
m_frontend2 = false;
|
m_frontend2 = false;
|
||||||
m_url.clear();
|
|
||||||
} //ServerInfo::setDefault
|
} //ServerInfo::setDefault
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------
|
||||||
|
Copy from another object
|
||||||
|
|
||||||
|
source: The object to copy
|
||||||
|
--------------------------------------------------------------------*/
|
||||||
|
void ServerInfo::copy(const ServerInfo& source) {
|
||||||
|
if (this == &source)
|
||||||
|
return;
|
||||||
|
m_name = source.m_name;
|
||||||
|
m_version = source.m_version;
|
||||||
|
m_adminContact = source.m_adminContact;
|
||||||
|
m_description = source.m_description;
|
||||||
|
m_frontend2 = source.m_frontend2;
|
||||||
|
m_url = source.m_url;
|
||||||
|
m_migration = (source.m_migration) ? std::make_unique<ServerMigration>(*source.m_migration) : nullptr;
|
||||||
|
} //ServerInfo::copy
|
||||||
|
|||||||
@@ -30,11 +30,29 @@ namespace speckle::record::cred {
|
|||||||
@param isFrontEnd ?
|
@param isFrontEnd ?
|
||||||
@param migration Server migration record
|
@param migration Server migration record
|
||||||
*/
|
*/
|
||||||
ServerInfo(const utility::String& name, const utility::String& company, const utility::String& version, const utility::String& contact,
|
ServerInfo(const utility::String& name, const utility::String::Option company = std::nullopt,
|
||||||
const utility::String& description, const utility::String& url, bool isFrontEnd, const ServerMigration& migration) :
|
const utility::String::Option version = std::nullopt, const utility::String::Option contact = std::nullopt,
|
||||||
|
const utility::String::Option description = std::nullopt, const utility::String::Option url = std::nullopt,
|
||||||
|
bool isFrontEnd = false, std::unique_ptr<ServerMigration> migration = nullptr) :
|
||||||
m_name{name}, m_company{company}, m_version{version}, m_adminContact{contact}, m_description{description},
|
m_name{name}, m_company{company}, m_version{version}, m_adminContact{contact}, m_description{description},
|
||||||
m_url{url}, m_frontend2{isFrontEnd}, m_migration{migration} {}
|
m_url{url}, m_frontend2{isFrontEnd}, m_migration{std::move(migration)} {}
|
||||||
ServerInfo(const ServerInfo&) = default;
|
/*!
|
||||||
|
Copy constructor
|
||||||
|
@param source The object to copy
|
||||||
|
*/
|
||||||
|
ServerInfo(const ServerInfo& source) { copy(source); }
|
||||||
|
/*!
|
||||||
|
Destructor
|
||||||
|
*/
|
||||||
|
~ServerInfo() {}
|
||||||
|
|
||||||
|
// MARK: - Operators
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Assignment operator
|
||||||
|
@param source The object to copy
|
||||||
|
*/
|
||||||
|
ServerInfo& operator=(const ServerInfo& source) { copy(source); return *this; }
|
||||||
|
|
||||||
// MARK: - Functions (const)
|
// MARK: - Functions (const)
|
||||||
|
|
||||||
@@ -43,37 +61,78 @@ namespace speckle::record::cred {
|
|||||||
@return The server name
|
@return The server name
|
||||||
*/
|
*/
|
||||||
const utility::String& getName() const { return m_name; }
|
const utility::String& getName() const { return m_name; }
|
||||||
|
/*!
|
||||||
|
Get the company name
|
||||||
|
@return The company name
|
||||||
|
*/
|
||||||
|
const utility::String::Option& getCompany() const { return m_company; }
|
||||||
|
/*!
|
||||||
|
Get the version
|
||||||
|
@return The version
|
||||||
|
*/
|
||||||
|
const utility::String::Option& getVersion() const { return m_version; }
|
||||||
|
/*!
|
||||||
|
Get the admin contact email
|
||||||
|
@return The admin contact email
|
||||||
|
*/
|
||||||
|
const utility::String::Option& getAdminContact() const { return m_adminContact; }
|
||||||
|
/*!
|
||||||
|
Get the description
|
||||||
|
@return The description
|
||||||
|
*/
|
||||||
|
const utility::String::Option& getDescription() const { return m_description; }
|
||||||
|
/*!
|
||||||
|
Determine if ?
|
||||||
|
@return ?
|
||||||
|
*/
|
||||||
|
bool isFrontEnd() const { return m_frontend2; }
|
||||||
|
/*!
|
||||||
|
Get the URL
|
||||||
|
@return The URL
|
||||||
|
*/
|
||||||
|
const utility::String::Option& getURL() const { return m_url; }
|
||||||
|
/*!
|
||||||
|
Get the migration history
|
||||||
|
@return The migration history (nullptr = no history)
|
||||||
|
*/
|
||||||
|
const ServerMigration* getMigration() const { return m_migration.get(); }
|
||||||
|
|
||||||
// MARK: - Serialisation
|
// MARK: - Serialisation
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Fill an inventory with the package items
|
Fill an inventory with the package items
|
||||||
@param inventory The inventory to receive the package items
|
@param inventory The inventory to receive the package items
|
||||||
@return True if the package has added items to the inventory
|
@return True if the package has added items to the inventory
|
||||||
*/
|
*/
|
||||||
bool fillInventory(active::serialise::Inventory& inventory) const override;
|
bool fillInventory(active::serialise::Inventory& inventory) const override;
|
||||||
/*!
|
/*!
|
||||||
Get the specified cargo
|
Get the specified cargo
|
||||||
@param item The inventory item to retrieve
|
@param item The inventory item to retrieve
|
||||||
@return The requested cargo (nullptr on failure)
|
@return The requested cargo (nullptr on failure)
|
||||||
*/
|
*/
|
||||||
Cargo::Unique getCargo(const active::serialise::Inventory::Item& item) const override;
|
Cargo::Unique getCargo(const active::serialise::Inventory::Item& item) const override;
|
||||||
/*!
|
/*!
|
||||||
Set to the default package content
|
Set to the default package content
|
||||||
*/
|
*/
|
||||||
void setDefault() override;
|
void setDefault() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
/*!
|
||||||
|
Copy from another object
|
||||||
|
@param source The object to copy
|
||||||
|
*/
|
||||||
|
void copy(const ServerInfo& source);
|
||||||
|
|
||||||
///Server name
|
///Server name
|
||||||
utility::String m_name;
|
utility::String m_name;
|
||||||
///Company name
|
///Company name
|
||||||
utility::String m_company;
|
utility::String::Option m_company;
|
||||||
///Server version
|
///Server version
|
||||||
utility::String m_version;
|
utility::String::Option m_version;
|
||||||
///Admin contact email
|
///Admin contact email
|
||||||
utility::String m_adminContact;
|
utility::String::Option m_adminContact;
|
||||||
///Server description
|
///Server description
|
||||||
utility::String m_description;
|
utility::String::Option m_description;
|
||||||
/*!
|
/*!
|
||||||
This field is not returned from the GQL API, it should be populated after construction from the response headers.
|
This field is not returned from the GQL API, it should be populated after construction from the response headers.
|
||||||
See "Speckle.Core.Credentials.AccountManager"
|
See "Speckle.Core.Credentials.AccountManager"
|
||||||
@@ -84,9 +143,9 @@ namespace speckle::record::cred {
|
|||||||
This field is not returned from the GQL API, it should be populated after construction.
|
This field is not returned from the GQL API, it should be populated after construction.
|
||||||
See "Speckle.Core.Credentials.AccountManager"
|
See "Speckle.Core.Credentials.AccountManager"
|
||||||
*/
|
*/
|
||||||
utility::String m_url;
|
utility::String::Option m_url;
|
||||||
///Server migration record
|
///Server migration record
|
||||||
ServerMigration m_migration;
|
std::unique_ptr<ServerMigration> m_migration;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "Speckle/Record/Credentials/ServerMigration.h"
|
#include "Speckle/Record/Credentials/ServerMigration.h"
|
||||||
|
|
||||||
#include "Active/Serialise/Item/Wrapper/ValueWrap.h"
|
#include "Active/Serialise/Item/Wrapper/ValueOptionWrap.h"
|
||||||
#include "Speckle/Utility/Guid.h"
|
#include "Speckle/Utility/Guid.h"
|
||||||
|
|
||||||
using namespace active::serialise;
|
using namespace active::serialise;
|
||||||
@@ -57,19 +57,10 @@ Cargo::Unique ServerMigration::getCargo(const Inventory::Item& item) const {
|
|||||||
using namespace active::serialise;
|
using namespace active::serialise;
|
||||||
switch (item.index) {
|
switch (item.index) {
|
||||||
case movedToID:
|
case movedToID:
|
||||||
return std::make_unique<ValueWrap<String>>(movedTo);
|
return std::make_unique<StringOptWrap>(movedTo);
|
||||||
case movedFromID:
|
case movedFromID:
|
||||||
return std::make_unique<ValueWrap<String>>(movedFrom);
|
return std::make_unique<StringOptWrap>(movedFrom);
|
||||||
default:
|
default:
|
||||||
return nullptr; //Requested an unknown index
|
return nullptr; //Requested an unknown index
|
||||||
}
|
}
|
||||||
} //ServerMigration::getCargo
|
} //ServerMigration::getCargo
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------
|
|
||||||
Set to the default package content
|
|
||||||
--------------------------------------------------------------------*/
|
|
||||||
void ServerMigration::setDefault() {
|
|
||||||
movedTo.clear();
|
|
||||||
movedFrom.clear();
|
|
||||||
} //ServerMigration::setDefault
|
|
||||||
|
|||||||
@@ -12,6 +12,16 @@ namespace speckle::record::cred {
|
|||||||
class ServerMigration : public active::serialise::Package {
|
class ServerMigration : public active::serialise::Package {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
// MARK: - Types
|
||||||
|
|
||||||
|
using base = active::serialise::Package;
|
||||||
|
///Unique pointer
|
||||||
|
using Unique = std::unique_ptr<ServerMigration>;
|
||||||
|
///Shared pointer
|
||||||
|
using Shared = std::shared_ptr<ServerMigration>;
|
||||||
|
///Optional
|
||||||
|
using Option = std::optional<ServerMigration>;
|
||||||
|
|
||||||
// MARK: - Constructors
|
// MARK: - Constructors
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -25,9 +35,9 @@ namespace speckle::record::cred {
|
|||||||
// MARK: - Public variables
|
// MARK: - Public variables
|
||||||
|
|
||||||
///New URI where this server is now deployed
|
///New URI where this server is now deployed
|
||||||
speckle::utility::String movedTo;
|
speckle::utility::String::Option movedTo;
|
||||||
///Previous URI where this server used to be deployed
|
///Previous URI where this server used to be deployed
|
||||||
speckle::utility::String movedFrom;
|
speckle::utility::String::Option movedFrom;
|
||||||
|
|
||||||
// MARK: - Serialisation
|
// MARK: - Serialisation
|
||||||
|
|
||||||
@@ -43,10 +53,6 @@ namespace speckle::record::cred {
|
|||||||
@return The requested cargo (nullptr on failure)
|
@return The requested cargo (nullptr on failure)
|
||||||
*/
|
*/
|
||||||
Cargo::Unique getCargo(const active::serialise::Inventory::Item& item) const override;
|
Cargo::Unique getCargo(const active::serialise::Inventory::Item& item) const override;
|
||||||
/*!
|
|
||||||
Set to the default package content
|
|
||||||
*/
|
|
||||||
void setDefault() override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "Speckle/Record/Credentials/UserInfo.h"
|
#include "Speckle/Record/Credentials/UserInfo.h"
|
||||||
|
|
||||||
#include "Active/Serialise/Item/Wrapper/ValueWrap.h"
|
#include "Active/Serialise/Item/Wrapper/ValueOptionWrap.h"
|
||||||
#include "Active/Serialise/Package/PackageWrap.h"
|
#include "Active/Serialise/Package/Wrapper/PackageWrap.h"
|
||||||
#include "Speckle/Utility/Guid.h"
|
#include "Speckle/Utility/Guid.h"
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
@@ -73,9 +73,9 @@ Cargo::Unique UserInfo::getCargo(const Inventory::Item& item) const {
|
|||||||
case emailID:
|
case emailID:
|
||||||
return std::make_unique<ValueWrap<String>>(m_email);
|
return std::make_unique<ValueWrap<String>>(m_email);
|
||||||
case companyID:
|
case companyID:
|
||||||
return std::make_unique<ValueWrap<String>>(m_company);
|
return std::make_unique<StringOptWrap>(m_company);
|
||||||
case avatarID:
|
case avatarID:
|
||||||
return std::make_unique<ValueWrap<String>>(m_avatar);
|
return std::make_unique<StringOptWrap>(m_avatar);
|
||||||
default:
|
default:
|
||||||
return nullptr; //Requested an unknown index
|
return nullptr; //Requested an unknown index
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,5 @@ Cargo::Unique UserInfo::getCargo(const Inventory::Item& item) const {
|
|||||||
void UserInfo::setDefault() {
|
void UserInfo::setDefault() {
|
||||||
m_id.clear();
|
m_id.clear();
|
||||||
m_name.clear();
|
m_name.clear();
|
||||||
m_company.clear();
|
|
||||||
m_email.clear();
|
m_email.clear();
|
||||||
m_avatar.clear();
|
|
||||||
} //UserInfo::setDefault
|
} //UserInfo::setDefault
|
||||||
|
|||||||
@@ -71,9 +71,9 @@ namespace speckle::record::cred {
|
|||||||
///User email
|
///User email
|
||||||
utility::String m_email;
|
utility::String m_email;
|
||||||
///Compsny name
|
///Compsny name
|
||||||
utility::String m_company;
|
utility::String::Option m_company;
|
||||||
///Avatar?
|
///Avatar?
|
||||||
utility::String m_avatar;
|
utility::String::Option m_avatar;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "Active/Setting/Values/StringValue.h"
|
#include "Active/Setting/Values/StringValue.h"
|
||||||
#include "Active/Setting/Values/UInt32Value.h"
|
#include "Active/Setting/Values/UInt32Value.h"
|
||||||
#include "Active/Serialise/Package/Package.h"
|
#include "Active/Serialise/Package/Package.h"
|
||||||
#include "Active/Serialise/Package/PackageWrap.h"
|
#include "Active/Serialise/Package/Wrapper/PackageWrap.h"
|
||||||
#include "Active/Serialise/XML/Item/XMLDateTime.h"
|
#include "Active/Serialise/XML/Item/XMLDateTime.h"
|
||||||
#include "Speckle/Environment/Platform.h"
|
#include "Speckle/Environment/Platform.h"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user