Enzo
Loading...
Searching...
No Matches
GeometryConnection.h
1#pragma once
2
3#include "Engine/Types.h"
4#include <boost/signals2.hpp>
5
6namespace enzo::nt
7{
8class GeometryOperator;
9
27{
28public:
39 GeometryConnection(enzo::nt::OpId inputOpId, unsigned int inputOpIndex, enzo::nt::OpId outputOpId, unsigned int outputOpIndex);
40
46 unsigned int getInputIndex() const;
48 unsigned int getOutputIndex() const;
49
51 friend std::ostream& operator<<(std::ostream& os, const GeometryConnection& p)
52 {
53 return os << p.inputOperatorId_ << ":" << p.inputIndex_ << " -> " << p.outputOperatorId_ << ":" << p.outputIndex_ << "\n";
54 }
55
57 boost::signals2::signal<void ()> removed;
59 void remove();
60 // bool isValid();
61private:
62 enzo::nt::OpId inputOperatorId_;
63 enzo::nt::OpId outputOperatorId_;
64 unsigned int inputIndex_;
65 unsigned int outputIndex_;
66};
67}
Basic attribute, parameter, and node types for Enzo.
uint64_t OpId
The unique ID assigned to each node in the network.
Definition Types.h:80
Directional edges to connect nodes.
Definition GeometryConnection.h:27
enzo::nt::OpId getOutputOpId() const
Returns the Operator ID of the connection output (where data flows to).
Definition GeometryConnection.cpp:11
unsigned int getInputIndex() const
Returns the socket number of getInputOpId in which data flows from.
Definition GeometryConnection.cpp:12
GeometryConnection(enzo::nt::OpId inputOpId, unsigned int inputOpIndex, enzo::nt::OpId outputOpId, unsigned int outputOpIndex)
Constructs a connection between two nodes.
Definition GeometryConnection.cpp:5
unsigned int getOutputIndex() const
Returns the socket number of getOutputOpId in which data flows to.
Definition GeometryConnection.cpp:13
void remove()
Removes the connection from it's associated nodes. Does not delete the object.
Definition GeometryConnection.cpp:15
enzo::nt::OpId getInputOpId() const
Returns the Operator ID of the connection input (where data flows from).
Definition GeometryConnection.cpp:10
boost::signals2::signal< void()> removed
A signal emitted when the connection is removed.
Definition GeometryConnection.h:57
friend std::ostream & operator<<(std::ostream &os, const GeometryConnection &p)
Provides an ostream representation of the connection, useful for debugging.
Definition GeometryConnection.h:51