feat: remove static members from singleton, convert to thread safe
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user