CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::Graph Class Reference

#include <CeresEngine/Graph/Graph.hpp>

Inheritance diagram for CeresEngine::Graph:
CeresEngine::RefCounted< Graph > CeresEngine::MaterialGraph CeresEngine::RenderGraph2::RenderGraph

Public Member Functions

 Graph ()=default
 
virtual ~Graph () noexcept=default
 
GraphNodegetNode (StringView name) const
 
const Vector< GraphNodePtr > & getNodes () const noexcept
 
void addNode (GraphNode &node)
 
template<typename T , typename... Args>
requires (std::is_base_of_v<GraphNode, T>)
TaddNode (Args &&... args)
 
void removeNode (GraphNode &node)
 
GraphConnectionconnect (GraphSocket &outputSocket, GraphSocket &inputSocket)
 
GraphInstancePtr instantiate ()
 
- Public Member Functions inherited from CeresEngine::RefCounted< Graph >
 RefCounted (Args &&... args)
 Creates a new RefCounted object and constructs a new Deleter by forwarding Args to it.
 
void retain () noexcept
 Retains the object by increment it's reference count by one.
 
bool release () noexcept
 Relases the object by decrementing it's reference count by one.
 

Public Attributes

Event< void()> onChange
 
Event< void(GraphNode &)> onNodeAdded
 
Event< void(GraphNode &)> onNodeRemoved
 

Private Attributes

Vector< GraphNodePtrmNodes
 

Constructor & Destructor Documentation

◆ Graph()

CeresEngine::Graph::Graph ( )
explicitdefault

◆ ~Graph()

virtual CeresEngine::Graph::~Graph ( )
virtualdefaultnoexcept

Member Function Documentation

◆ addNode() [1/2]

template<typename T , typename... Args>
requires (std::is_base_of_v<GraphNode, T>)
T & CeresEngine::Graph::addNode ( Args &&...  args)
inline

◆ addNode() [2/2]

void CeresEngine::Graph::addNode ( GraphNode node)

◆ connect()

GraphConnection * CeresEngine::Graph::connect ( GraphSocket outputSocket,
GraphSocket inputSocket 
)

◆ getNode()

GraphNode * CeresEngine::Graph::getNode ( StringView  name) const

◆ getNodes()

const Vector< GraphNodePtr > & CeresEngine::Graph::getNodes ( ) const
inlinenoexcept

◆ instantiate()

GraphInstancePtr CeresEngine::Graph::instantiate ( )

◆ removeNode()

void CeresEngine::Graph::removeNode ( GraphNode node)

Member Data Documentation

◆ mNodes

Vector<GraphNodePtr> CeresEngine::Graph::mNodes
private

◆ onChange

Event<void()> CeresEngine::Graph::onChange

◆ onNodeAdded

Event<void(GraphNode&)> CeresEngine::Graph::onNodeAdded

◆ onNodeRemoved

Event<void(GraphNode&)> CeresEngine::Graph::onNodeRemoved

The documentation for this class was generated from the following file: