bacdbc4d61
Moved ownership of ModelCardDatabase from Addon to ConnectorProject Tools requiring access to the model card database now need to check for an open project first and then obtain the database from it (prevents attempts to access model cards when no project is open)
32 lines
1.1 KiB
C++
32 lines
1.1 KiB
C++
#include "Connector/Environment/ConnectorProject.h"
|
|
|
|
#include "Connector/Connector.h"
|
|
#include "Connector/Database/ModelCardDatabase.h"
|
|
|
|
using namespace connector::database;
|
|
using namespace connector::environment;
|
|
using namespace speckle::utility;
|
|
|
|
/*--------------------------------------------------------------------
|
|
Default constructor
|
|
--------------------------------------------------------------------*/
|
|
ConnectorProject::ConnectorProject() {
|
|
m_modelCards = std::make_unique<ModelCardDatabase>();
|
|
}
|
|
|
|
|
|
/*--------------------------------------------------------------------
|
|
Destructor
|
|
--------------------------------------------------------------------*/
|
|
ConnectorProject::~ConnectorProject() {}
|
|
|
|
|
|
/*--------------------------------------------------------------------
|
|
Get the model card database
|
|
|
|
return; The model card database
|
|
--------------------------------------------------------------------*/
|
|
const ModelCardDatabase* ConnectorProject::getModelCardDatabase() const {
|
|
return m_modelCards.get();
|
|
} //ConnectorProject::getModelCardDatabase
|