Enzo
Loading...
Searching...
No Matches
src
Engine
Network
GeometryOpDef.h
1
#pragma once
2
#include "
Engine/Core/Types.h
"
3
#include "Engine/Network/CookContext.h"
4
#include "Engine/Network/NodePacket.h"
5
#include "Engine/Network/OpInfo.h"
6
#include <boost/config.hpp>
7
#include <memory>
8
#include <vector>
9
10
// forward declaration
11
namespace
enzo::nt {
12
class
NetworkManager;
13
}
14
15
namespace
enzo::nt {
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::CookContext
context) = 0;
50
59
std::shared_ptr<const enzo::NodePacket> getOutputPacket(
unsigned
outputIndex);
60
65
void
throwError(std::string error);
66
72
void
throwWarning(std::string warning);
73
76
unsigned
int
getMinInputs()
const
;
79
unsigned
int
getMaxInputs()
const
;
82
unsigned
int
getMaxOutputs()
const
;
83
84
private
:
85
std::vector<std::shared_ptr<const enzo::NodePacket>> outputPackets_;
86
87
protected
:
88
const
op::OpInfo
opInfo_;
89
nt::NetworkManager
* network_;
90
bool
outputRequested(
unsigned
int
outputIndex);
91
// TODO: std::move geometry instead of copying
92
void
setOutputPacket(
unsigned
int
outputIndex,
enzo::NodePacket
packet);
93
};
94
95
using
opConstructor =
GeometryOpDef
* (*)(
enzo::nt::NetworkManager
* network,
96
enzo::op::OpInfo
opInfo);
97
98
}
// namespace enzo::nt
Types.h
Basic attribute, parameter, and node types for Enzo.
enzo::NodePacket
Definition
NodePacket.h:9
enzo::nt::GeometryOpDef
Abstract class used to create new operators.
Definition
GeometryOpDef.h:34
enzo::nt::GeometryOpDef::cookOp
virtual void cookOp(op::CookContext 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::CookContext
Provides network context for the cookOp function.
Definition
CookContext.h:24
enzo::op::OpInfo
Definition
OpInfo.h:19
Generated by
1.12.0