CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::InputSlot Class Referenceabstract

A slot that inputs a resource. Can be connected to a single output. More...

#include <CeresEngine/Renderer/RenderGraph/RenderGraphSlot.hpp>

Inheritance diagram for CeresEngine::InputSlot:
CeresEngine::Slot CeresEngine::BasicInputSlot CeresEngine::TSlot< BasicInputSlot, RT > CeresEngine::TSlot< BasicInputSlot, ImageRenderResource > CeresEngine::TInput< RT >

Public Member Functions

 InputSlot (RenderTask *task, const StringView name)
 
 InputSlot (RenderTask &task, StringView name)
 
 ~InputSlot ()
 
Type getType () const final
 
Connection * getConnection (Slot &slot) const override
 Finds a connection to the given slot.
 
ConnectionPtr connect (OutputSlot &output)
 Connects the given output to this input slot.
 
bool supports (Slot &slot) const override
 Checks if this slot supports a connection to the given slot.
 
virtual const ConnectionPtr & getConnection () const =0
 Gets the connection currently in use.
 
OutputSlot * getConnectedSlot () const
 Gets the output slot used in the current connection.
 
- Public Member Functions inherited from CeresEngine::Slot
 Slot (RenderTask *task, const StringView name)
 
 Slot (RenderTask &task, StringView name)
 
 ~Slot ()
 
RenderTask & getRenderTask () const
 The render task that owns this render graph slot.
 
StringView getName () const
 A human-readable name for the slot.
 
virtual RenderResourceType getResourceType () const =0
 The type of resource accepted by the slot.
 
bool isInput () const
 Returns true if the slot is an input slot, false otherwise.
 
InputSlot & asInput ()
 
const InputSlot & asInput () const
 
bool isOutput () const
 Returns true if the slot is an output slot, false otherwise.
 
OutputSlot & asOutput ()
 
const OutputSlot & asOutput () const
 
bool isConnected (Slot &slot) const
 Checks if there's an active connection to the given slot.
 
UInt32 disconnectAll ()
 

Protected Member Functions

bool shouldDisconnect (Connection &connection) const override
 An internal method called whenever a new disconnection is being made.
 
- Protected Member Functions inherited from CeresEngine::Slot
virtual bool shouldConnect (Slot &slot) const
 An internal method called whenever a new connection is being made.
 
virtual void willConnect (Slot &slot)
 An internal method called before the slot is connected.
 
virtual void didConnect (Connection &connection)
 An internal method called after the slot is connected.
 
virtual void willDisconnect (Connection &connection)
 An internal method called before the slot is disconnected.
 
virtual void didDisconnect (Connection &slot)
 An internal method called whenever the slot is disconnected.
 

Additional Inherited Members

- Public Types inherited from CeresEngine::Slot
enum class  Type { Input , Output }
 A enumeration of the types of slots. More...
 
- Static Public Member Functions inherited from CeresEngine::Slot
static ConnectionPtr connect (InputSlot &input, OutputSlot &output)
 Connects an output slot into an input slot.
 
static bool disconnect (InputSlot &input, OutputSlot &output)
 Disconnect the given slot from this slot.
 
- Public Attributes inherited from CeresEngine::Slot
Event< void(Connection &)> onConnect
 An event triggered whenever the slot is connected to another.
 
Event< void(Connection &)> onDisconnect
 An event triggered whenever the slot is disconnected from another.
 
- Protected Attributes inherited from CeresEngine::Slot
RenderTask & mTask
 The render task that owns this render graph slot.
 
const StringView mName
 A human-readable name for the slot.
 

Detailed Description

A slot that inputs a resource. Can be connected to a single output.

Constructor & Destructor Documentation

◆ InputSlot() [1/2]

CeresEngine::InputSlot::InputSlot ( RenderTask *  task,
const StringView  name 
)
inline

◆ InputSlot() [2/2]

CeresEngine::InputSlot::InputSlot ( RenderTask &  task,
StringView  name 
)

◆ ~InputSlot()

CeresEngine::InputSlot::~InputSlot ( )

Member Function Documentation

◆ connect()

ConnectionPtr CeresEngine::InputSlot::connect ( OutputSlot &  output)

Connects the given output to this input slot.

◆ getConnectedSlot()

OutputSlot * CeresEngine::InputSlot::getConnectedSlot ( ) const

Gets the output slot used in the current connection.

◆ getConnection() [1/2]

virtual const ConnectionPtr & CeresEngine::InputSlot::getConnection ( ) const
pure virtual

Gets the connection currently in use.

Implemented in CeresEngine::BasicInputSlot.

◆ getConnection() [2/2]

Connection * CeresEngine::InputSlot::getConnection ( Slot &  slot) const
overridevirtual

Finds a connection to the given slot.

If no such connections exists, returns nullptr.

Implements CeresEngine::Slot.

◆ getType()

Type CeresEngine::InputSlot::getType ( ) const
inlinefinalvirtual

Implements CeresEngine::Slot.

◆ shouldDisconnect()

bool CeresEngine::InputSlot::shouldDisconnect ( Connection &  connection) const
overrideprotectedvirtual

An internal method called whenever a new disconnection is being made.

The slot implementation can use this method to refuse disconnections.

Reimplemented from CeresEngine::Slot.

◆ supports()

bool CeresEngine::InputSlot::supports ( Slot &  slot) const
overridevirtual

Checks if this slot supports a connection to the given slot.

Reimplemented from CeresEngine::Slot.


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