diff --git a/SpeckleConnector/Connector.xcodeproj/project.pbxproj b/SpeckleConnector/Connector.xcodeproj/project.pbxproj index 11398cd..695b45b 100644 --- a/SpeckleConnector/Connector.xcodeproj/project.pbxproj +++ b/SpeckleConnector/Connector.xcodeproj/project.pbxproj @@ -1365,7 +1365,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "mkdir -p \"$HEADER_PATH_3/ResourceObjects\"\npython3 \"$HEADER_PATH_5/Tools/CompileResources.py\" INT \"$HEADER_PATH_5/..\" \"$HEADER_PATH_6\" \"$SRCROOT\" \"$HEADER_PATH_3/ResourceObjects\" \"$SYMROOT/$CONFIGURATION/$PRODUCT_NAME.$WRAPPER_EXTENSION/Contents/Resources\"\ncp \"$HEADER_PATH_5/Inc/PkgInfo\" \"$SYMROOT/$CONFIGURATION/$PRODUCT_NAME.$WRAPPER_EXTENSION/Contents/PkgInfo\"\ntouch \"$HEADER_PATH_3/ResourceObjects/AddOnResources.stamp\"\n"; + shellScript = "mkdir -p \"$HEADER_PATH_6/ResourceObjects\"\npython3 \"$HEADER_PATH_5/Tools/CompileResources.py\" INT \"$HEADER_PATH_5/..\" \"$HEADER_PATH_6\" \"$SRCROOT\" \"$HEADER_PATH_6/ResourceObjects\" \"$SYMROOT/$CONFIGURATION/$PRODUCT_NAME.$WRAPPER_EXTENSION/Contents/Resources\"\npython3 \"$HEADER_PATH_5/Tools/CompileResources.py\" INT \"$HEADER_PATH_5/..\" \"$HEADER_PATH_3\" \"$SRCROOT\" \"$HEADER_PATH_6/ResourceObjects\" \"$SYMROOT/$CONFIGURATION/$PRODUCT_NAME.$WRAPPER_EXTENSION/Contents/Resources\"\ncp \"$HEADER_PATH_5/Inc/PkgInfo\" \"$SYMROOT/$CONFIGURATION/$PRODUCT_NAME.$WRAPPER_EXTENSION/Contents/PkgInfo\"\ntouch \"$HEADER_PATH_6/ResourceObjects/AddOnResources.stamp\"\n"; }; 213CC3A12B1101F500088049 /* Install */ = { isa = PBXShellScriptBuildPhase; diff --git a/SpeckleConnector/Connector/Interface/Browser/Bridge/Base/GetDocumentInfo.cpp b/SpeckleConnector/Connector/Interface/Browser/Bridge/Base/GetDocumentInfo.cpp index 5c4a9a9..0154aef 100644 --- a/SpeckleConnector/Connector/Interface/Browser/Bridge/Base/GetDocumentInfo.cpp +++ b/SpeckleConnector/Connector/Interface/Browser/Bridge/Base/GetDocumentInfo.cpp @@ -1,7 +1,9 @@ #include "Connector/Interface/Browser/Bridge/Base/GetDocumentInfo.h" #include "Active/Serialise/CargoHold.h" +#include "Connector/Connector.h" #include "Connector/Interface/Browser/Bridge/Base/Arg/DocumentInfo.h" +#include "Speckle/Environment/Project.h" using namespace active::container; using namespace active::serialise; @@ -29,6 +31,13 @@ GetDocumentInfo::GetDocumentInfo() : BridgeMethod{"GetDocumentInfo", [&]() { --------------------------------------------------------------------*/ std::unique_ptr GetDocumentInfo::run() const { ///TODO: Get the document info here - returning mocked values for now - DocumentInfo docInfo{"Somewhere", "Something", String{active::utility::Guid{true}.operator active::utility::String()}}; + DocumentInfo docInfo; + if (auto project = connector()->getActiveProject().lock(); project) { + auto info = project->getInfo(); + docInfo.name = info.name; + if (info.path) + docInfo.location = *info.path; + //TODO: No suitable project ID is currently available + } return std::make_unique(docInfo); } //GetDocumentInfo::run diff --git a/SpeckleConnector/Connector/Interface/Browser/Bridge/Send/Send.cpp b/SpeckleConnector/Connector/Interface/Browser/Bridge/Send/Send.cpp index 12ce6ed..b0278b3 100644 --- a/SpeckleConnector/Connector/Interface/Browser/Bridge/Send/Send.cpp +++ b/SpeckleConnector/Connector/Interface/Browser/Bridge/Send/Send.cpp @@ -2,6 +2,7 @@ #include "Active/Serialise/CargoHold.h" #include "Active/Serialise/Package/Wrapper/PackageWrap.h" +#include "Speckle/Utility/Exception.h" using namespace active::serialise; using namespace connector::interfac::browser::bridge; @@ -21,5 +22,6 @@ Send::Send() : BridgeMethod{"Send", [&](UpdateArgs args) { modelCardID: The ID of the madel to send --------------------------------------------------------------------*/ void Send::run(const String& modelCardID) const { - ///TODO: Send the requested model + ///TODO: Find and send selected elements - the following is a placeholder + throw Exception{"No objects were found to convert. Please update your publish filter!"}; } //Send::run diff --git a/SpeckleConnector/Connector/Record/Model/Filter/SendFilter.cpp b/SpeckleConnector/Connector/Record/Model/Filter/SendFilter.cpp index c624d96..81e2bf2 100644 --- a/SpeckleConnector/Connector/Record/Model/Filter/SendFilter.cpp +++ b/SpeckleConnector/Connector/Record/Model/Filter/SendFilter.cpp @@ -56,8 +56,8 @@ bool SendFilter::fillInventory(Inventory& inventory) const { inventory.merge(Inventory{ { { fieldID[nameID], nameID, element }, - { fieldID[summaryID], summaryID, element }, - { fieldID[defaultID], defaultID, element }, + { fieldID[summaryID], summaryID, element, !m_summary.empty() }, + { fieldID[defaultID], defaultID, element, m_isDefault }, }, }.withType(&typeid(SendFilter))); return true; diff --git a/SpeckleConnector/RINT/Connector.grc b/SpeckleConnector/RINT/Connector.grc index 20de2c7..0d04b7f 100644 --- a/SpeckleConnector/RINT/Connector.grc +++ b/SpeckleConnector/RINT/Connector.grc @@ -1,4 +1,3 @@ -'STR#' 32600 "Title strings" { -/* [ 1] */ "Speckle Connector" -/* [ 2] */ "Connector to share model content with Speckle" +'STR#' 32700 "Title strings" { +/* [ 1] */ "Untitled" } diff --git a/SpeckleLib/RINT/Speckle.grc b/SpeckleLib/RINT/Speckle.grc new file mode 100644 index 0000000..20de2c7 --- /dev/null +++ b/SpeckleLib/RINT/Speckle.grc @@ -0,0 +1,4 @@ +'STR#' 32600 "Title strings" { +/* [ 1] */ "Speckle Connector" +/* [ 2] */ "Connector to share model content with Speckle" +} diff --git a/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreCore.cpp b/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreCore.cpp index 84e653e..11b81ac 100644 --- a/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreCore.cpp +++ b/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreCore.cpp @@ -4,6 +4,7 @@ #include "Active/Utility/Memory.h" #include "Active/Utility/String.h" #include "Speckle/Environment/Addon.h" +#include "Speckle/Environment/Project.h" #include "Speckle/Event/Type/DocStoreMergeEvent.h" #include "Speckle/Event/Type/ProjectEvent.h" #include "Speckle/Utility/Guid.h" @@ -174,18 +175,17 @@ bool DocumentStoreCore::handle(const DocStoreMergeEvent& event) { return: True if the event should be closed --------------------------------------------------------------------*/ bool DocumentStoreCore::handle(const event::ProjectEvent& event) { -#ifdef ARCHICAD + using enum ProjectEvent::Type; switch (event.getType()) { - case APINotify_Close: + case close: resetStore(); //Wipe the cache, forcing a full reload when the data is requested again (after a project is opened) break; - case APINotify_PreSave: case APINotify_SendChanges: + case presave: case send: writeStore(); //Ensure the data is stored with the save/send break; default: break; } -#endif return false; } //DocumentStoreCore::handle @@ -221,6 +221,10 @@ active::utility::Memory DocumentStoreCore::readStore() const { --------------------------------------------------------------------*/ void DocumentStoreCore::writeStore() { #ifdef ARCHICAD + auto activeProject = addon()->getActiveProject(); + bool shared = false; + if (auto project = activeProject.lock(); project && project->getInfo().isShared) + shared = true; //Ensure a suitable data store exists if (!isExistingStore(m_id)) { //Create when missing @@ -230,7 +234,7 @@ void DocumentStoreCore::writeStore() { m_id.id = Guid{acID}; } //Reserve the storage object in TW - if (addon()->isSharedDocument()) { + if (shared) { GS::HashTable conflicts; if (auto statusCode = convertArchicadError(ACAPI_AddOnObject_ReserveObjects({Guid{m_id.id}}, &conflicts)); statusCode != nominal) throw std::system_error(makeError(statusCode)); @@ -244,7 +248,7 @@ void DocumentStoreCore::writeStore() { if (auto statusCode = convertArchicadError(ACAPI_AddOnObject_ModifyObject(Guid{m_id.id}, nullptr, &output)); statusCode != nominal) throw std::system_error(makeError(statusCode)); //Release the storage object in TW - if (addon()->isSharedDocument()) { + if (shared) { if (auto statusCode = convertArchicadError(ACAPI_AddOnObject_ReleaseObjects({Guid{m_id.id}})); statusCode != nominal) throw std::system_error(makeError(statusCode)); } diff --git a/SpeckleLib/Speckle/Environment/Addon.cpp b/SpeckleLib/Speckle/Environment/Addon.cpp index 015e643..1714805 100644 --- a/SpeckleLib/Speckle/Environment/Addon.cpp +++ b/SpeckleLib/Speckle/Environment/Addon.cpp @@ -1,10 +1,16 @@ #include "Speckle/Environment/Addon.h" +#include "Speckle/Environment/Project.h" +#include "Speckle/Event/Type/ProjectEvent.h" + +#include + #ifdef ARCHICAD #include #endif using namespace speckle::environment; +using namespace speckle::event; using namespace speckle::utility; namespace { @@ -52,19 +58,15 @@ String Addon::getLocalString(short itemIndex, short resourceIndex) const { /*-------------------------------------------------------------------- - Determine if the active document is shared (in collaborative environments) + Get the active project - return: True if the active document is shared + return: The active project (nullptr = no open project) --------------------------------------------------------------------*/ -bool Addon::isSharedDocument() const { -#ifdef ARCHICAD - API_ProjectInfo pi{}; - ACAPI_ProjectOperation_Project(&pi); - return pi.teamwork; -#else - return false; -#endif -} //Addon::isSharedDocument +std::weak_ptr Addon::getActiveProject() const { + if (m_activeProject) + return m_activeProject; + return std::weak_ptr{}; +} //Addon::getActiveProject /*-------------------------------------------------------------------- @@ -76,7 +78,9 @@ void Addon::publishExternal(const active::event::Event& event) { if (!logCallback()) return; try { + preprocessEvent(event); publish(event); + postprocessEvent(event); } catch (...) { //Add error logging in future } @@ -147,7 +151,7 @@ speckle::environment::Addon* speckle::environment::addon() { return: True if the callback can continue (false on error) --------------------------------------------------------------------*/ -bool speckle::environment::Addon::logCallback(bool initialise) { +bool Addon::logCallback(bool initialise) { if (initialise) m_callDepth = 1; else @@ -162,3 +166,53 @@ bool speckle::environment::Addon::logCallback(bool initialise) { } return true; } //Addon::publishExternalEvent + + +/*-------------------------------------------------------------------- + Preprocess an external event (allowing key add-on operations to act before other subscribers) + + event: An incoming event + + return: True if the event should be closed, i.e. not passed to other subscribers + --------------------------------------------------------------------*/ +bool Addon::preprocessEvent(const active::event::Event& event) { + if (auto projectEvent = dynamic_cast(&event); projectEvent != nullptr) { + using enum ProjectEvent::Type; + switch (projectEvent->getType()) { + case newDocument: case newAndReset: case open: + m_activeProject = makeProject(); //Ensure a project object is available + default: + break; + } + } + return false; +} //Addon::preprocessEvent + + +/*-------------------------------------------------------------------- + Postprocess an external event (allowing key add-on operations to act after all other subscribers are complete) + + event: An incoming (completed) event + --------------------------------------------------------------------*/ +void Addon::postprocessEvent(const active::event::Event& event) { + if (auto projectEvent = dynamic_cast(&event); projectEvent != nullptr) { + using enum ProjectEvent::Type; + switch (projectEvent->getType()) { + case close: case quit: + m_activeProject.reset(); //Release the active project on close/quit + default: + break; + } + } +} //Addon::postprocessEvent + + +/*-------------------------------------------------------------------- + Make a new new project. Allows Addon subclasses to define a Project subclass with additional functions/databases + + return: A new project instance + --------------------------------------------------------------------*/ +std::shared_ptr Addon::makeProject() const { + auto project = new Project; //make_shared can't use protected constructor + return std::shared_ptr{project}; +} //Addon::makeProject diff --git a/SpeckleLib/Speckle/Environment/Addon.h b/SpeckleLib/Speckle/Environment/Addon.h index 7f52e71..bc0ea7b 100644 --- a/SpeckleLib/Speckle/Environment/Addon.h +++ b/SpeckleLib/Speckle/Environment/Addon.h @@ -5,7 +5,9 @@ #include "Speckle/Utility/String.h" namespace speckle::environment { - + + class Project; + /*! A base class for an addon */ @@ -19,11 +21,7 @@ namespace speckle::environment { @param identity Optional name/ID for the subscriber */ Addon(const active::utility::NameID& identity); - /*! - Copy constructor - @param source The object to copy - */ - Addon(const App& source) : App{source} {} + Addon(const App&) = delete; /*! Destructor */ @@ -39,10 +37,10 @@ namespace speckle::environment { */ speckle::utility::String getLocalString(short itemIndex, short resourceIndex) const; /*! - Determine if the active document is shared (in collaborative environments) - @return True if the active document is shared + Get the active project + @return The active project (nullptr = no open project) */ - bool isSharedDocument() const; + std::weak_ptr getActiveProject() const; // MARK: - Functions (mutating) @@ -50,7 +48,7 @@ namespace speckle::environment { Set the add-on name @param nm The add-on name */ - void setName(const speckle::utility::String& nm) { name = nm; } + void setName(const speckle::utility::String& nm) { App::name = nm; } /*! Publish an event from an external source to subscribers @param event The event to publish @@ -75,6 +73,7 @@ namespace speckle::environment { Shut down event handling */ void stop() override; + protected: /*! Log a callback into the add-on (allows checking of re-entry) @@ -82,8 +81,27 @@ namespace speckle::environment { @return True if the callback can continue (false on error) */ bool logCallback(bool initialise = true); + /*! + Preprocess an external event (allowing key add-on operations to act before other subscribers) + @param event An incoming event + @return True if the event should be closed, i.e. not passed to other subscribers + */ + virtual bool preprocessEvent(const active::event::Event& event); + /*! + Postprocess an external event (allowing key add-on operations to act after all other subscribers are complete) + @param event An incoming (completed) event + */ + virtual void postprocessEvent(const active::event::Event& event); + /*! + Make a new new project. Allows Addon subclasses to define a Project subclass with additional functions/databases + @return A new project instance + */ + virtual std::shared_ptr makeProject() const; private: + ///The active project + std::shared_ptr m_activeProject; + ///The depth of nested callbacks - the root call starts at depth 0 (important for some entry-point initialisation) uint32_t m_callDepth = 0; }; diff --git a/SpeckleLib/Speckle/Environment/Project.cpp b/SpeckleLib/Speckle/Environment/Project.cpp new file mode 100644 index 0000000..ead4930 --- /dev/null +++ b/SpeckleLib/Speckle/Environment/Project.cpp @@ -0,0 +1,67 @@ +#include "Speckle/Environment/Project.h" + +#include "Speckle/Environment/Addon.h" +#include "Speckle/SpeckleResource.h" + +#ifdef ARCHICAD +#include +#endif + +using namespace speckle::environment; +using namespace speckle::utility; + +namespace { + +} + +/*-------------------------------------------------------------------- + Constructor (NB: this object is assumed to be the active instance) + + identity: Optional name/ID for the subscriber + --------------------------------------------------------------------*/ +Project::Project() { +} //Project::Project + + +/*-------------------------------------------------------------------- + Destructor + --------------------------------------------------------------------*/ +Project::~Project() { +} //Project::~Project + + +/*-------------------------------------------------------------------- + Get information about the project + + return: Project information + --------------------------------------------------------------------*/ +Project::Info Project::getInfo() const { + //Start with an untitled project - this will be replaced if a saved project is active + Info result{addon()->getLocalString(titleStringLib, untitledProjectID)}; +#ifdef ARCHICAD + API_ProjectInfo projectInfo; + if (ACAPI_ProjectOperation_Project(&projectInfo) == NoError) { + if (projectInfo.projectName != nullptr) + result.name = *projectInfo.projectName; + result.isShared = projectInfo.teamwork; + if (projectInfo.teamwork) { + if (projectInfo.projectPath != nullptr) + result.path = String{*projectInfo.projectPath}; + else if (projectInfo.location_team != nullptr) { + GS::UniString path; + if (projectInfo.location_team->ToPath(&path) == NoError) + result.path = String{path}; + } + } else { + if (projectInfo.projectPath != nullptr) + result.path = String{*projectInfo.projectPath}; + else if (projectInfo.location != nullptr) { + GS::UniString path; + if (projectInfo.location->ToPath(&path) == NoError) + result.path = String{path}; + } + } + } +#endif + return result; +} //Project::getInfo diff --git a/SpeckleLib/Speckle/Environment/Project.h b/SpeckleLib/Speckle/Environment/Project.h new file mode 100644 index 0000000..1aac39b --- /dev/null +++ b/SpeckleLib/Speckle/Environment/Project.h @@ -0,0 +1,69 @@ +#ifndef SPECKLE_ENVIRONMENT_PROJECT +#define SPECKLE_ENVIRONMENT_PROJECT + +#include "Active/File/Path.h" +#include "Speckle/Utility/String.h" + +namespace speckle::environment { + + class Addon; + + /*! + A BIM project + + This class is currently skeletal, but is intended to be the primnary conduit for any document-based data, e.g. elements, attributes, properties + etc. Any databases managing document-based content should be retrieved from this class rather than Add-on (or subclasses) or static functions. + */ + class Project { + public: + + // MARK: - Types + + ///Shared pointer + using Shared = std::shared_ptr; + ///Weak pointer + using Weak = std::weak_ptr; + ///Project information + struct Info { + //The project name + utility::String name; + //The project ID + utility::String ID; + //Either local path or server URL where the project is stored (nullopt if memory-based only, i.e. unsaved) + active::file::Path::Option path; + //True if the project is shared (cloud-based) + bool isShared = false; + }; + + // MARK: - Constructors + + Project(const Project&) = delete; + /*! + Destructor + */ + ~Project(); + + // MARK: - Functions (const) + + /*! + Get information about the project + @return Project information + */ + Info getInfo() const; + + // MARK: - Functions (mutating) + + protected: + friend class speckle::environment::Addon; + + /*! + Default constructor + + NB: Only the Addon class can create projects. Clients can get the active project from the running add-on. + */ + Project(); + }; + +} + +#endif //SPECKLE_ENVIRONMENT_PROJECT diff --git a/SpeckleLib/Speckle/Event/Subscriber/ProjectSubscriber.h b/SpeckleLib/Speckle/Event/Subscriber/ProjectSubscriber.h index 60096ca..0e8c164 100644 --- a/SpeckleLib/Speckle/Event/Subscriber/ProjectSubscriber.h +++ b/SpeckleLib/Speckle/Event/Subscriber/ProjectSubscriber.h @@ -17,8 +17,9 @@ namespace speckle::event { /*! Default constructor - */ - ProjectSubscriber() = default; + @param priority The subscriber priority (determines the order in which subscribers receive events) + */ + ProjectSubscriber(int32_t priority = 0) : active::event::Subscriber{priority} {} /*! Copy constructor @param source The object to copy diff --git a/SpeckleLib/Speckle/Event/Type/ProjectEvent.cpp b/SpeckleLib/Speckle/Event/Type/ProjectEvent.cpp new file mode 100644 index 0000000..e9109b5 --- /dev/null +++ b/SpeckleLib/Speckle/Event/Type/ProjectEvent.cpp @@ -0,0 +1,38 @@ +#include "Speckle/Event/Type/ProjectEvent.h" + +using namespace speckle::event; + +#ifdef ARCHICAD +/*-------------------------------------------------------------------- + Convert an Archicad project event type + + return: The equivalent Speckle event type + --------------------------------------------------------------------*/ +std::optional ProjectEvent::convert(API_NotifyEventID acEventType) { + using enum ProjectEvent::Type; + switch (acEventType) { + case APINotify_New: + return newDocument; + case APINotify_NewAndReset: + return newAndReset; + case APINotify_Open: + return open; + case APINotify_PreSave: + return presave; + case APINotify_Save: + return save; + case APINotify_Close: + return close; + case APINotify_Quit: + return quit; + case APINotify_TempSave: + return tempSave; + case APINotify_SendChanges: + return send; + case APINotify_ReceiveChanges: + return receive; + default: + return std::nullopt; + } //ProjectEvent::convert +} +#endif diff --git a/SpeckleLib/Speckle/Event/Type/ProjectEvent.h b/SpeckleLib/Speckle/Event/Type/ProjectEvent.h index 30c46df..e4dd7bb 100644 --- a/SpeckleLib/Speckle/Event/Type/ProjectEvent.h +++ b/SpeckleLib/Speckle/Event/Type/ProjectEvent.h @@ -6,6 +6,10 @@ #include "Active/Utility/Guid.h" #include "Active/Utility/String.h" +#ifdef ARCHICAD +#include +#endif + namespace speckle::event { /*! @@ -14,6 +18,23 @@ namespace speckle::event { class ProjectEvent : public active::event::Event { public: + // MARK: - Types + + ///Common project event types + enum class Type { + unknown, + newDocument, + newAndReset, + open, + presave, + save, + close, + quit, + tempSave, + send, + receive, + }; + static const inline active::utility::NameID ID{active::utility::String{"project event"}, active::utility::Guid{active::utility::String{"0ffb9ec5-2164-4fc2-aa57-17b5a1f15355"}}}; @@ -30,15 +51,17 @@ namespace speckle::event { @param param An additional parameter relevant to some project events */ ProjectEvent(API_NotifyEventID notifyEvent, int32_t param) : Event{ID} { - m_eventID = notifyEvent; + m_eventID = convert(notifyEvent).value_or(Type::unknown); m_param = param; } +#endif /*! Get the event type @return The event type */ - API_NotifyEventID getType() const { return m_eventID; } + Type getType() const { return m_eventID; } +#ifdef ARCHICAD /*! Get the event parameter @return The event parameter @@ -46,10 +69,17 @@ namespace speckle::event { int32_t getParam() const { return m_param; } #endif + private: + ///The event type + Type m_eventID; #ifdef ARCHICAD - //Incoming document objects to merge - API_NotifyEventID m_eventID; + ///An additional event parameter int32_t m_param; + /*! + Convert an Archicad project event type + @return The equivalent Speckle event type + */ + static std::optional convert(API_NotifyEventID acEventType); #endif }; diff --git a/SpeckleLib/Speckle/SpeckleResource.h b/SpeckleLib/Speckle/SpeckleResource.h new file mode 100755 index 0000000..70843ea --- /dev/null +++ b/SpeckleLib/Speckle/SpeckleResource.h @@ -0,0 +1,44 @@ +#ifndef SPECKLE_RESOURCE +#define SPECKLE_RESOURCE + + //String resource IDs +enum SpeckleStringResource { + titleStringLib = 32700, + generalStringLib, + notifyStringLib, + warningStringLib, + errorStringLib, +}; + + + //Title strings (UI title/label for dialogs, controls, menu items etc) +enum SpeckleTitleString { + untitledProjectID = 1, +}; + + + //Help strings +enum SpecklePromptString { +}; + + + //Information strings (in UI content, logging, reports) +enum SpeckleInfoString { +}; + + + //Notification strings (advice displayed in alerts) +enum SpeckleNotifyString { +}; + + + //Warning strings (warnings displayed in alerts) +enum SpeckleWarningString { +}; + + + //Error strings (errors displayed in alerts) +enum SpeckleErrorString { +}; + +#endif //SPECKLE_RESOURCE diff --git a/SpeckleLib/SpeckleLib.xcodeproj/project.pbxproj b/SpeckleLib/SpeckleLib.xcodeproj/project.pbxproj index 0953228..4db2969 100644 --- a/SpeckleLib/SpeckleLib.xcodeproj/project.pbxproj +++ b/SpeckleLib/SpeckleLib.xcodeproj/project.pbxproj @@ -15,6 +15,9 @@ 210CC89F2C81E34400610F58 /* Platform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 210CC89D2C81E34400610F58 /* Platform.cpp */; }; 210CC8A02C81E34400610F58 /* Platform.h in Headers */ = {isa = PBXBuildFile; fileRef = 210CC89E2C81E34400610F58 /* Platform.h */; }; 212A88132AE48821001EAFE7 /* libArchicad27.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 21379E082AE47A6400A1584C /* libArchicad27.a */; platformFilters = (macos, ); }; + 215F08552C99DA8D00CD343B /* Project.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 215F08512C99DA8D00CD343B /* Project.cpp */; }; + 215F08562C99DA8D00CD343B /* Project.h in Headers */ = {isa = PBXBuildFile; fileRef = 215F08542C99DA8D00CD343B /* Project.h */; }; + 215F08662C9B006800CD343B /* ProjectEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 215F08652C9B006700CD343B /* ProjectEvent.cpp */; }; 2193517B2C624FC100E5A69C /* MenuSubscriber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 219351782C624FC100E5A69C /* MenuSubscriber.cpp */; }; 2193519B2C6278D900E5A69C /* SelectionSubscriber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 219351992C6278D900E5A69C /* SelectionSubscriber.cpp */; }; 219351B12C62CC1A00E5A69C /* Guid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 219351AC2C62CC1A00E5A69C /* Guid.cpp */; }; @@ -106,6 +109,11 @@ 21379E082AE47A6400A1584C /* libArchicad27.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libArchicad27.a; sourceTree = BUILT_PRODUCTS_DIR; }; 214EA4C52BA374FD008E5358 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 214EA4C62BA3762D008E5358 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = SOURCE_ROOT; }; + 215F08512C99DA8D00CD343B /* Project.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Project.cpp; sourceTree = ""; }; + 215F08542C99DA8D00CD343B /* Project.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Project.h; sourceTree = ""; }; + 215F085B2C9AE23200CD343B /* SpeckleResource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SpeckleResource.h; sourceTree = ""; }; + 215F08622C9AE3D200CD343B /* Speckle.grc */ = {isa = PBXFileReference; lastKnownFileType = text; path = Speckle.grc; sourceTree = ""; }; + 215F08652C9B006700CD343B /* ProjectEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProjectEvent.cpp; sourceTree = ""; }; 2167E2782C4911E2000827D3 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 2167E2792C4911EB000827D3 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 2167E27C2C49121F000827D3 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; @@ -207,6 +215,7 @@ 21F69F1B2C6A0FE2008B6A06 /* Interface */, 21F69F952C71087A008B6A06 /* Record */, 212A834E2AE47AD9001EAFE7 /* Serialise */, + 215F085B2C9AE23200CD343B /* SpeckleResource.h */, 219351B02C62CC1A00E5A69C /* Utility */, 218953A32C0C9CB00078F182 /* Version.h */, ); @@ -231,6 +240,7 @@ 21F69F012C66C229008B6A06 /* Doxyfile */, 21379E092AE47A6400A1584C /* Products */, 21329F472BFA611C00B5C7AF /* README.md */, + 215F08612C9AE3D200CD343B /* RINT */, 212A83422AE47AD9001EAFE7 /* Speckle */, 219987FA2BD708BC0035E5EA /* SpeckleLibDoctest */, ); @@ -245,6 +255,14 @@ name = Products; sourceTree = ""; }; + 215F08612C9AE3D200CD343B /* RINT */ = { + isa = PBXGroup; + children = ( + 215F08622C9AE3D200CD343B /* Speckle.grc */, + ); + path = RINT; + sourceTree = SOURCE_ROOT; + }; 218953A92C0F29FB0078F182 /* EventTests */ = { isa = PBXGroup; children = ( @@ -281,6 +299,7 @@ children = ( 21D0BDBE2C90F36B0077E104 /* DocStoreMergeEvent.h */, 219351892C62655700E5A69C /* MenuEvent.h */, + 215F08652C9B006700CD343B /* ProjectEvent.cpp */, 21D0BDC62C9245E40077E104 /* ProjectEvent.h */, 2193519C2C627E3100E5A69C /* SelectionEvent.h */, ); @@ -467,6 +486,8 @@ 21F93AE92B2F406D009A2C5B /* Addon.h */, 210CC89D2C81E34400610F58 /* Platform.cpp */, 210CC89E2C81E34400610F58 /* Platform.h */, + 215F08512C99DA8D00CD343B /* Project.cpp */, + 215F08542C99DA8D00CD343B /* Project.h */, 21329F632BFD452C00B5C7AF /* Environment.md */, ); path = Environment; @@ -491,6 +512,7 @@ 21B67D002C7CE15100FD64FC /* Exception.h in Headers */, 21D0BD2C2C86FC350077E104 /* Record.h in Headers */, 21D0BDB42C8F8AB60077E104 /* DocumentStoreCore.h in Headers */, + 215F08562C99DA8D00CD343B /* Project.h in Headers */, 210CC8802C80CD2A00610F58 /* BridgeChild.h in Headers */, 21D0BD4D2C8901A00077E104 /* ServerInfo.h in Headers */, 21D0BDB52C8F8AB60077E104 /* DocumentStoreEngine.h in Headers */, @@ -626,6 +648,7 @@ 21F69F812C6FF3B0008B6A06 /* BridgeArgumentWrap.cpp in Sources */, 2193517B2C624FC100E5A69C /* MenuSubscriber.cpp in Sources */, 21F69F612C6D0286008B6A06 /* GetBindingsMethodNames.cpp in Sources */, + 215F08662C9B006800CD343B /* ProjectEvent.cpp in Sources */, 21D0BDBD2C90F2830077E104 /* DocStoreSubscriber.cpp in Sources */, 21D0BDB32C8F8AB60077E104 /* DocumentStoreCore.cpp in Sources */, 21F93AEC2B2F406E009A2C5B /* Addon.cpp in Sources */, @@ -641,6 +664,7 @@ 219351B32C62CC1A00E5A69C /* String.cpp in Sources */, 219351B12C62CC1A00E5A69C /* Guid.cpp in Sources */, 21F69F512C6CCC25008B6A06 /* BrowserBridge.cpp in Sources */, + 215F08552C99DA8D00CD343B /* Project.cpp in Sources */, 21F69F3B2C6B880C008B6A06 /* JSBaseTransport.cpp in Sources */, 210CC89F2C81E34400610F58 /* Platform.cpp in Sources */, 21D0BD202C86F0280077E104 /* AccountDatabase.cpp in Sources */,