feat: variable socket counts
This commit is contained in:
@@ -3,8 +3,12 @@
|
||||
#include "Engine/Operator/Context.h"
|
||||
#include "Engine/Types.h"
|
||||
#include <boost/config.hpp>
|
||||
#include "Engine/Operator/OpInfo.h"
|
||||
|
||||
|
||||
// forward declaration
|
||||
namespace enzo::nt {class NetworkManager;}
|
||||
|
||||
namespace enzo::nt
|
||||
{
|
||||
class NetworkManager;
|
||||
@@ -12,24 +16,25 @@ class NetworkManager;
|
||||
class BOOST_SYMBOL_EXPORT GeometryOpDef
|
||||
{
|
||||
public:
|
||||
GeometryOpDef(enzo::nt::OpId opId);
|
||||
GeometryOpDef(nt::NetworkManager* network, op::OpInfo opInfo);
|
||||
virtual void cookOp(op::Context context) = 0;
|
||||
geo::Geometry& getOutputGeo(unsigned outputIndex);
|
||||
|
||||
unsigned int getMinInputs() const;
|
||||
unsigned int getMaxInputs() const;
|
||||
unsigned int getMaxOutputs() const;
|
||||
private:
|
||||
std::vector<enzo::geo::Geometry> outputGeometry_;
|
||||
unsigned int minInputs_;
|
||||
unsigned int maxInputs_;
|
||||
unsigned int maxOutputs_;
|
||||
|
||||
protected:
|
||||
enzo::nt::OpId opId_;
|
||||
const enzo::geo::Geometry& getInputGeoView(unsigned int inputIndex);
|
||||
const op::OpInfo opInfo_;
|
||||
nt::NetworkManager* network_;
|
||||
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);
|
||||
using opConstructor = GeometryOpDef* (*)(enzo::nt::NetworkManager* network, enzo::op::OpInfo opInfo);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user