refactor: connect context, remove network manager pass to opDef

This commit is contained in:
parker
2025-07-14 20:19:49 +01:00
parent 79d8a9096a
commit 1253785f2b
11 changed files with 53 additions and 42 deletions

View File

@@ -12,24 +12,22 @@ class NetworkManager;
class BOOST_SYMBOL_EXPORT GeometryOpDef
{
public:
GeometryOpDef(enzo::nt::OpId opId, NetworkManager& networkManager);
virtual void cookOp() = 0;
GeometryOpDef(enzo::nt::OpId opId);
virtual void cookOp(op::Context context) = 0;
geo::Geometry& getOutputGeo(unsigned outputIndex);
private:
std::vector<enzo::geo::Geometry> outputGeometry_;
unsigned int minInputs_;
unsigned int maxInputs_;
unsigned int maxOutputs_;
NetworkManager& networkManager_;
protected:
enzo::nt::OpId opId_;
const enzo::geo::Geometry& getInputGeoView(unsigned int inputIndex);
enzo::geo::Geometry cloneInputGeo(unsigned int inputIndex);
bool outputRequested(unsigned int outputIndex);
// TODO: std::move geometry instead of copying
void setOutputGeometry(unsigned int outputIndex, enzo::geo::Geometry geometry);
};
using opConstructor = GeometryOpDef* (*)(enzo::nt::OpId, enzo::nt::NetworkManager&);
using opConstructor = GeometryOpDef* (*)(enzo::nt::OpId);
}