feat: remove static members from singleton, convert to thread safe

This commit is contained in:
parker
2025-07-14 16:36:44 +01:00
parent 4dfae16942
commit a1d4d77be4
9 changed files with 71 additions and 60 deletions

View File

@@ -22,8 +22,9 @@ const enzo::geo::Geometry& enzo::nt::GeometryOpDef::getInputGeoView(unsigned int
enzo::geo::Geometry enzo::nt::GeometryOpDef::cloneInputGeo(unsigned int inputIndex)
{
auto& nm = nt::nm();
// TODO: implement
enzo::nt::GeometryOperator& selfOp = nt::NetworkManager::getGeoOperator(opId_);
enzo::nt::GeometryOperator& selfOp = nm.getGeoOperator(opId_);
std::vector<std::shared_ptr<const nt::GeometryConnection>> inputConnections = selfOp.getInputConnections();
if(inputConnections.size()==0)
{
@@ -31,7 +32,7 @@ enzo::geo::Geometry enzo::nt::GeometryOpDef::cloneInputGeo(unsigned int inputInd
return enzo::geo::Geometry();
}
std::shared_ptr<const nt::GeometryConnection> inputConnection = inputConnections.at(inputIndex);
return nt::NetworkManager::getGeoOperator(inputConnection->getInputOpId()).getOutputGeo(inputConnection->getInputIndex());
return nm.getGeoOperator(inputConnection->getInputOpId()).getOutputGeo(inputConnection->getInputIndex());
}
void enzo::nt::GeometryOpDef::setOutputGeometry(unsigned int outputIndex, enzo::geo::Geometry geometry)

View File

@@ -9,8 +9,10 @@ using namespace enzo;
void enzo::nt::connectOperators(enzo::nt::OpId inputOpId, unsigned int inputIndex, enzo::nt::OpId outputOpId, unsigned int outputIndex)
{
auto& inputOp = nt::NetworkManager::getGeoOperator(inputOpId);
auto& outputOp = nt::NetworkManager::getGeoOperator(outputOpId);
auto& nm = nt::nm();
auto& inputOp = nm.getGeoOperator(inputOpId);
auto& outputOp = nm.getGeoOperator(outputOpId);
auto newConnection = std::make_shared<nt::GeometryConnection>(inputOpId, inputIndex, outputOpId, outputIndex);