|
CeresEngine 0.2.0
A game development framework
|
A render task slot. More...
#include <CeresEngine/Renderer/RenderGraph/RenderGraphSlot.hpp>
Public Types | |
| enum class | Type { Input , Output } |
| A enumeration of the types of slots. More... | |
Public Member Functions | |
| 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. | |
| virtual Type | getType () const =0 |
| 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 |
| virtual Connection * | getConnection (Slot &slot) const =0 |
Finds a connection to the given slot. | |
| bool | isConnected (Slot &slot) const |
Checks if there's an active connection to the given slot. | |
| UInt32 | disconnectAll () |
| virtual bool | supports (Slot &slot) const |
| Checks if this slot supports a connection to the given slot. | |
Static Public Member Functions | |
| 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 | |
| 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 Member Functions | |
| 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 bool | shouldDisconnect (Connection &connection) const |
| An internal method called whenever a new disconnection is being made. | |
| 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. | |
Protected Attributes | |
| RenderTask & | mTask |
| The render task that owns this render graph slot. | |
| const StringView | mName |
| A human-readable name for the slot. | |
Friends | |
| ConnectionPtr | connect (InputSlot &input, OutputSlot &output) |
| Connects an output slot into an input slot. | |
| bool | disconnect (InputSlot &input, OutputSlot &output) |
Disconnect the given slot from this slot. | |
A render task slot.
Each slot can be either input or output and can be used to connect dependent resources between multiple tasks.
|
strong |
|
inlineexplicit |
|
explicit |
| CeresEngine::Slot::~Slot | ( | ) |
|
inline |
|
inline |
|
inline |
|
static |
Connects an output slot into an input slot.
|
inlineprotectedvirtual |
An internal method called after the slot is connected.
Reimplemented in CeresEngine::BasicInputSlot, and CeresEngine::BasicOutputSlot.
|
inlineprotectedvirtual |
An internal method called whenever the slot is disconnected.
Reimplemented in CeresEngine::BasicInputSlot, and CeresEngine::BasicOutputSlot.
|
static |
Disconnect the given slot from this slot.
| UInt32 CeresEngine::Slot::disconnectAll | ( | ) |
|
pure virtual |
Finds a connection to the given slot.
If no such connections exists, returns nullptr.
Implemented in CeresEngine::InputSlot, and CeresEngine::OutputSlot.
|
inline |
A human-readable name for the slot.
|
inline |
The render task that owns this render graph slot.
|
pure virtual |
The type of resource accepted by the slot.
Implemented in CeresEngine::TSlot< BasicInputSlot, ImageRenderResource >, CeresEngine::TSlot< BasicInputSlot, RT >, and CeresEngine::TSlot< BasicOutputSlot, RT >.
Implemented in CeresEngine::InputSlot, and CeresEngine::OutputSlot.
Checks if there's an active connection to the given slot.
|
inline |
Returns true if the slot is an input slot, false otherwise.
|
inline |
Returns true if the slot is an output slot, false otherwise.
An internal method called whenever a new connection is being made.
The slot implementation can use this method to refuse connections.
|
protectedvirtual |
An internal method called whenever a new disconnection is being made.
The slot implementation can use this method to refuse disconnections.
Reimplemented in CeresEngine::InputSlot, and CeresEngine::OutputSlot.
Checks if this slot supports a connection to the given slot.
Reimplemented in CeresEngine::InputSlot, and CeresEngine::OutputSlot.
An internal method called before the slot is connected.
|
inlineprotectedvirtual |
An internal method called before the slot is disconnected.
|
friend |
Connects an output slot into an input slot.
|
friend |
Disconnect the given slot from this slot.
|
protected |
A human-readable name for the slot.
|
protected |
The render task that owns this render graph slot.
| Event<void(Connection&)> CeresEngine::Slot::onConnect |
An event triggered whenever the slot is connected to another.
| Event<void(Connection&)> CeresEngine::Slot::onDisconnect |
An event triggered whenever the slot is disconnected from another.