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

#include <CeresEngine/Graph/GraphNode.hpp>

Inheritance diagram for CeresEngine::GraphNode:
CeresEngine::RefCounted< GraphNode > CeresEngine::GraphInstance CeresEngine::MaterialGraphNode CeresEngine::RenderGraph2::RenderGraphTask CeresEngine::MaterialGraphOutputNode CeresEngine::RenderGraph2::RenderGraphClearTask CeresEngine::RenderGraph2::RenderGraphComputeTask CeresEngine::RenderGraph2::RenderGraphGraphicsTask CeresEngine::RenderGraph2::RenderGraphPresentTask CeresEngine::MaterialGraphLiteralNode< T > CeresEngine::MaterialGraphMathNode< T > CeresEngine::RenderGraph2::RenderGraphAsyncComputeTask CeresEngine::MaterialGraphBinaryMathNode< T, O >

Public Member Functions

 GraphNode (Graph &graph, const UUID &uuid)
 
virtual ~GraphNode () noexcept=default
 
GraphgetGraph () const noexcept
 
const UUIDgetUUID () const noexcept
 
StringView getDisplayName () const noexcept
 
void setDisplayName (String displayName)
 
StringView getNodeTypeName () const
 
GraphSocketgetSocket (StringView name) const
 
const Vector< GraphSocket * > & getInputSockets () const noexcept
 
const Vector< GraphSocket * > & getOutputs () const noexcept
 
const Vector< GraphSocketPtr > & getSockets () const noexcept
 
GraphSocketaddSocket (String name, GraphSocketDirection direction)
 
template<typename T >
GraphSocketaddSocket (String name, const GraphSocketDirection direction)
 
GraphSocketaddInputSocket (String name)
 
template<typename T >
GraphSocketaddInputSocket (String name)
 
GraphSocketaddOutputSocket (String name)
 
template<typename T >
GraphSocketaddOutputSocket (String name)
 
void removeSocket (GraphSocket &socket)
 
void removeSocket (StringView name)
 
void forEachSocket (std::function< void(GraphSocket &)> function)
 
void onAttach (Graph &graph, const UUID &uuid)
 
void onDetach (const Graph &graph)
 
void markAsChanged ()
 
- Public Member Functions inherited from CeresEngine::RefCounted< GraphNode >
 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(GraphSocket &)> onSocketAdded
 
Event< void(GraphSocket &)> onSocketRemoved
 
Event< void(GraphConnection &)> onConnect
 
Event< void(GraphConnection &)> onDisconnect
 

Protected Attributes

GraphmGraph
 
UUID mUUID
 
String mDisplayName
 
Vector< GraphSocket * > mInputs
 
Vector< GraphSocket * > mOutputs
 
Vector< GraphSocketPtrmSockets
 

Friends

class Graph
 

Constructor & Destructor Documentation

◆ GraphNode()

CeresEngine::GraphNode::GraphNode ( Graph graph,
const UUID uuid 
)
inlineexplicit

◆ ~GraphNode()

virtual CeresEngine::GraphNode::~GraphNode ( )
virtualdefaultnoexcept

Member Function Documentation

◆ addInputSocket() [1/2]

GraphSocket & CeresEngine::GraphNode::addInputSocket ( String  name)
inline

◆ addInputSocket() [2/2]

template<typename T >
GraphSocket & CeresEngine::GraphNode::addInputSocket ( String  name)
inline

◆ addOutputSocket() [1/2]

GraphSocket & CeresEngine::GraphNode::addOutputSocket ( String  name)
inline

◆ addOutputSocket() [2/2]

template<typename T >
GraphSocket & CeresEngine::GraphNode::addOutputSocket ( String  name)
inline

◆ addSocket() [1/2]

template<typename T >
GraphSocket & CeresEngine::GraphNode::addSocket ( String  name,
const GraphSocketDirection  direction 
)
inline

◆ addSocket() [2/2]

GraphSocket & CeresEngine::GraphNode::addSocket ( String  name,
GraphSocketDirection  direction 
)

◆ forEachSocket()

void CeresEngine::GraphNode::forEachSocket ( std::function< void(GraphSocket &)>  function)

◆ getDisplayName()

StringView CeresEngine::GraphNode::getDisplayName ( ) const
inlinenoexcept

◆ getGraph()

Graph * CeresEngine::GraphNode::getGraph ( ) const
inlinenoexcept

◆ getInputSockets()

const Vector< GraphSocket * > & CeresEngine::GraphNode::getInputSockets ( ) const
inlinenoexcept

◆ getNodeTypeName()

StringView CeresEngine::GraphNode::getNodeTypeName ( ) const

◆ getOutputs()

const Vector< GraphSocket * > & CeresEngine::GraphNode::getOutputs ( ) const
inlinenoexcept

◆ getSocket()

GraphSocket * CeresEngine::GraphNode::getSocket ( StringView  name) const

◆ getSockets()

const Vector< GraphSocketPtr > & CeresEngine::GraphNode::getSockets ( ) const
inlinenoexcept

◆ getUUID()

const UUID & CeresEngine::GraphNode::getUUID ( ) const
inlinenoexcept

◆ markAsChanged()

void CeresEngine::GraphNode::markAsChanged ( )

◆ onAttach()

void CeresEngine::GraphNode::onAttach ( Graph graph,
const UUID uuid 
)

◆ onDetach()

void CeresEngine::GraphNode::onDetach ( const Graph graph)

◆ removeSocket() [1/2]

void CeresEngine::GraphNode::removeSocket ( GraphSocket socket)

◆ removeSocket() [2/2]

void CeresEngine::GraphNode::removeSocket ( StringView  name)

◆ setDisplayName()

void CeresEngine::GraphNode::setDisplayName ( String  displayName)

Friends And Related Symbol Documentation

◆ Graph

friend class Graph
friend

Member Data Documentation

◆ mDisplayName

String CeresEngine::GraphNode::mDisplayName
protected

◆ mGraph

Graph* CeresEngine::GraphNode::mGraph
protected

◆ mInputs

Vector<GraphSocket*> CeresEngine::GraphNode::mInputs
protected

◆ mOutputs

Vector<GraphSocket*> CeresEngine::GraphNode::mOutputs
protected

◆ mSockets

Vector<GraphSocketPtr> CeresEngine::GraphNode::mSockets
protected

◆ mUUID

UUID CeresEngine::GraphNode::mUUID
protected

◆ onChange

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

◆ onConnect

Event<void(GraphConnection&)> CeresEngine::GraphNode::onConnect

◆ onDisconnect

Event<void(GraphConnection&)> CeresEngine::GraphNode::onDisconnect

◆ onSocketAdded

Event<void(GraphSocket&)> CeresEngine::GraphNode::onSocketAdded

◆ onSocketRemoved

Event<void(GraphSocket&)> CeresEngine::GraphNode::onSocketRemoved

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