Definition GraphConnection.hpp:19
Definition GraphNode.hpp:21
GraphSocket & addInputSocket(String name)
Definition GraphNode.hpp:80
void setDisplayName(String displayName)
GraphSocket & addSocket(String name, const GraphSocketDirection direction)
Definition GraphNode.hpp:75
Event< void(GraphSocket &)> onSocketAdded
Definition GraphNode.hpp:35
const Vector< GraphSocket * > & getOutputs() const noexcept
Definition GraphNode.hpp:67
Graph * getGraph() const noexcept
Definition GraphNode.hpp:47
Event< void(GraphConnection &)> onConnect
Definition GraphNode.hpp:38
Vector< GraphSocketPtr > mSockets
Definition GraphNode.hpp:30
GraphSocket * getSocket(StringView name) const
Vector< GraphSocket * > mOutputs
Definition GraphNode.hpp:29
void removeSocket(GraphSocket &socket)
StringView getNodeTypeName() const
const UUID & getUUID() const noexcept
Definition GraphNode.hpp:50
const Vector< GraphSocket * > & getInputSockets() const noexcept
Definition GraphNode.hpp:64
void forEachSocket(std::function< void(GraphSocket &)> function)
void onDetach(const Graph &graph)
void removeSocket(StringView name)
GraphSocket & addInputSocket(String name)
Definition GraphNode.hpp:77
GraphNode(Graph &graph, const UUID &uuid)
Definition GraphNode.hpp:42
const Vector< GraphSocketPtr > & getSockets() const noexcept
Definition GraphNode.hpp:70
Graph * mGraph
Definition GraphNode.hpp:23
StringView getDisplayName() const noexcept
Definition GraphNode.hpp:53
GraphSocket & addSocket(String name, GraphSocketDirection direction)
void onAttach(Graph &graph, const UUID &uuid)
GraphSocket & addOutputSocket(String name)
Definition GraphNode.hpp:82
UUID mUUID
Definition GraphNode.hpp:25
virtual ~GraphNode() noexcept=default
Event< void()> onChange
Definition GraphNode.hpp:33
Event< void(GraphSocket &)> onSocketRemoved
Definition GraphNode.hpp:36
String mDisplayName
Definition GraphNode.hpp:26
Event< void(GraphConnection &)> onDisconnect
Definition GraphNode.hpp:39
GraphSocket & addOutputSocket(String name)
Definition GraphNode.hpp:85
Vector< GraphSocket * > mInputs
Definition GraphNode.hpp:28
Definition GraphSocket.hpp:46
A simple reference counter base class.
Definition SmartPtr.hpp:438
Base template for the event class.
Definition Event.hpp:27
Definition Application.hpp:19
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
GraphSocketDirection
Enumeration that determines the direction of a socket.
Definition GraphSocket.hpp:21
@ Output
Determines that the socket takes a value as output.
@ Input
Determines that the socket takes a value as input.
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Represents a universally unique identifier (UUID).
Definition UUID.hpp:27