Enzo
Loading...
Searching...
No Matches
src
Engine
Operator
GeometryOpDef.h
1
#pragma once
2
#include "Engine/Operator/NodePacket.h"
3
#include "Engine/Operator/Context.h"
4
#include "
Engine/Types.h
"
5
#include <boost/config.hpp>
6
#include <memory>
7
#include <vector>
8
#include "Engine/Operator/OpInfo.h"
9
10
11
// forward declaration
12
namespace
enzo::nt {
class
NetworkManager;}
13
14
namespace
enzo::nt
15
{
16
class
NetworkManager;
17
33
class
BOOST_SYMBOL_EXPORT
GeometryOpDef
34
{
35
public
:
39
GeometryOpDef
(
nt::NetworkManager
* network,
op::OpInfo
opInfo);
40
virtual
~GeometryOpDef
() {};
41
49
virtual
void
cookOp
(
op::Context
context) = 0;
50
59
std::shared_ptr<const enzo::NodePacket> getOutputPacket(
unsigned
outputIndex);
60
65
void
throwError(std::string error);
66
68
unsigned
int
getMinInputs()
const
;
70
unsigned
int
getMaxInputs()
const
;
72
unsigned
int
getMaxOutputs()
const
;
73
private
:
74
std::vector<std::shared_ptr<const enzo::NodePacket>> outputPackets_;
75
76
protected
:
77
const
op::OpInfo
opInfo_;
78
nt::NetworkManager
* network_;
79
bool
outputRequested(
unsigned
int
outputIndex);
80
// TODO: std::move geometry instead of copying
81
void
setOutputPacket(
unsigned
int
outputIndex,
enzo::NodePacket
packet);
82
};
83
84
using
opConstructor =
GeometryOpDef
* (*)(
enzo::nt::NetworkManager
* network,
enzo::op::OpInfo
opInfo);
85
86
}
Types.h
Basic attribute, parameter, and node types for Enzo.
enzo::NodePacket
Definition
NodePacket.h:8
enzo::nt::GeometryOpDef
Abstract class used to create new operators.
Definition
GeometryOpDef.h:34
enzo::nt::GeometryOpDef::cookOp
virtual void cookOp(op::Context context)=0
This function is called at runtime to create the output geometry.
enzo::nt::NetworkManager
The central coordinator of the engine's node system.
Definition
NetworkManager.h:27
enzo::op::Context
Provides network context for the cookOp function.
Definition
Context.h:20
enzo::op::OpInfo
Definition
OpInfo.h:20
Generated by
1.12.0