diff --git a/SpeckleConnector/Connector/Database/ModelCardDatabase.cpp b/SpeckleConnector/Connector/Database/ModelCardDatabase.cpp index 761d8fc..c10d1b6 100644 --- a/SpeckleConnector/Connector/Database/ModelCardDatabase.cpp +++ b/SpeckleConnector/Connector/Database/ModelCardDatabase.cpp @@ -101,6 +101,16 @@ void ModelCardDatabase::erase(const String& cardID) const { } //ModelCardDatabase::erase +/*-------------------------------------------------------------------- + Get the unique ID of the engine storage + + return: The databas unique ID + --------------------------------------------------------------------*/ +RecordID ModelCardDatabase::getStoreID() const { + return m_engine->getUniqueID(); +} //ModelCardDatabase::getStoreID + + /*-------------------------------------------------------------------- Get a serialisation wrapper for the database diff --git a/SpeckleConnector/Connector/Database/ModelCardDatabase.h b/SpeckleConnector/Connector/Database/ModelCardDatabase.h index d2e7db6..79a2353 100644 --- a/SpeckleConnector/Connector/Database/ModelCardDatabase.h +++ b/SpeckleConnector/Connector/Database/ModelCardDatabase.h @@ -49,6 +49,11 @@ namespace connector::database { @return A database wrapper */ std::unique_ptr wrapper() const; + /*! + Get the unique ID of the engine storage + @return The database unique ID + */ + speckle::database::RecordID getStoreID() const; // MARK: - Functions (mutating) diff --git a/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreEngine.h b/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreEngine.h index 202ea0c..1d92a70 100644 --- a/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreEngine.h +++ b/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreEngine.h @@ -122,6 +122,11 @@ namespace speckle::database { @return The database outline */ Outline getOutline() const override; + /*! + Get the engine unique ID + @return The unique ID + */ + RecordID getUniqueID() const { return getCache()->getID(); } protected: /*!