42 template<
typename T,
typename... Args> [[
nodiscard]]
T&
addNode(Args&&... args)
requires(std::is_base_of_v<GraphNode, T>) {
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Definition GraphConnection.hpp:19
Event< void()> onChange
Definition Graph.hpp:25
virtual ~Graph() noexcept=default
T & addNode(Args &&... args)
Definition Graph.hpp:42
Vector< GraphNodePtr > mNodes
Definition Graph.hpp:22
GraphInstancePtr instantiate()
void addNode(GraphNode &node)
GraphNode * getNode(StringView name) const
GraphConnection * connect(GraphSocket &outputSocket, GraphSocket &inputSocket)
Event< void(GraphNode &)> onNodeRemoved
Definition Graph.hpp:28
Event< void(GraphNode &)> onNodeAdded
Definition Graph.hpp:27
void removeNode(GraphNode &node)
const Vector< GraphNodePtr > & getNodes() const noexcept
Definition Graph.hpp:38
Definition GraphNode.hpp:21
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
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25