0.2.0
Loading...
Searching...
No Matches
NAV::InputPin Class Reference

Input pins of nodes. More...

Classes

struct  IncomingLink
 Collection of information about the connected node and pin. More...
 

Public Types

using Callback
 Callback function types.
 
using DataChangedNotifyFunc
 
using FlowFirableCallbackFunc
 
using FlowFirableCheckFunc
 Function type to call when checking if a pin is firable.
 
using NodeDataQueue
 Node data queue type.
 

Public Member Functions

bool canCreateLink (const OutputPin &other) const
 Checks if this pin can connect to the provided pin.
 
bool createLink (OutputPin &startPin, ax::NodeEditor::LinkId linkId=0)
 Creates a link from this pin to another, calling all node specific callbacks.
 
void deleteLink ()
 Disconnects the link.
 
 InputPin ()=default
 Default constructor (for serialization)
 
 InputPin (ax::NodeEditor::PinId id, const char *name, Type type, Node *parentNode)
 Constructor.
 
 InputPin (const InputPin &)=delete
 Copy constructor.
 
 InputPin (InputPin &&other) noexcept
 Move constructor.
 
bool isPinLinked () const
 Checks if the pin is linked.
 
InputPinoperator= (const InputPin &)=delete
 Copy assignment operator.
 
InputPinoperator= (InputPin &&other) noexcept
 Move assignment operator.
 
bool recreateLink (OutputPin &startPin)
 Destroys and recreates a link from this pin to another.
 
 ~InputPin ()=default
 Destructor.
 
- Public Member Functions inherited from NAV::Pin
void drawPinIcon (bool connected, int alpha) const
 Draw the Pin Icon.
 
ImColor getIconColor () const
 Get the Icon Color object.
 
 Pin (ax::NodeEditor::PinId id, const char *name, Type type, Kind kind, Node *parentNode)
 Constructor.
 

Public Attributes

Callback callback
 Callback to call when the node is firable or when it should be notified of data change.
 
bool dropQueueIfNotFirable
 If true, drops elements from the queue if not firable, otherwise sleeps the worker.
 
FlowFirableCheckFunc firable
 Function to check if the callback is firable.
 
IncomingLink link
 Info to identify the linked pin.
 
bool neededForTemporalQueueCheck
 Whether it should be checked for temporal ordering.
 
int priority
 Priority when checking firable condition related to other pins (higher priority gets triggered first)
 
NodeDataQueue queue
 Queue with received data.
 
bool queueBlocked
 If true no more messages are accepted to the queue.
 
- Public Attributes inherited from NAV::Pin
std::vector< std::string > dataIdentifier
 One or multiple Data Identifiers (Unique name which is used for data flows)
 
ax::NodeEditor::PinId id
 Unique Id of the Pin.
 
Kind kind
 Kind of the Pin (Input/Output)
 
std::string name
 Name of the Pin.
 
NodeparentNode
 Reference to the parent node.
 
Type type
 Type of the Pin.
 

Additional Inherited Members

- Static Public Member Functions inherited from NAV::Pin
static bool canCreateLink (const OutputPin &startPin, const InputPin &endPin)
 Checks if pins can connect.
 
static bool dataIdentifierHaveCommon (const std::vector< std::string > &a, const std::vector< std::string > &b)
 Checks if the first list of data identifiers has a common entry with the second.
 
- Protected Member Functions inherited from NAV::Pin
 Pin ()=default
 Default constructor.
 
- Static Protected Member Functions inherited from NAV::Pin
static bool createLink (OutputPin &startPin, InputPin &endPin, ax::NodeEditor::LinkId linkId=0)
 Create a Link between the two given pins.
 
static void deleteLink (OutputPin &startPin, InputPin &endPin)
 Disconnects the link.
 
static bool recreateLink (OutputPin &startPin, InputPin &endPin)
 Destroys and recreates a link from this pin to another.
 

Detailed Description

Input pins of nodes.

Member Typedef Documentation

◆ DataChangedNotifyFunc

Notify function type to call when the connected value changed

  • 1st Parameter: Time when the message was received
  • 2nd Parameter: Pin index of the pin the data is received on

◆ FlowFirableCallbackFunc

Flow data callback function type to call when firable.

  • 1st Parameter: Queue with the received messages
  • 2nd Parameter: Pin index of the pin the data is received on

Constructor & Destructor Documentation

◆ InputPin()

NAV::InputPin::InputPin ( ax::NodeEditor::PinId id,
const char * name,
Type type,
Node * parentNode )
inline

Constructor.

Parameters
[in]idUnique Id of the Pin
[in]nameName of the Pin
[in]typeType of the Pin
[in]parentNodeReference to the parent node

Member Function Documentation

◆ canCreateLink()

bool NAV::InputPin::canCreateLink ( const OutputPin & other) const

Checks if this pin can connect to the provided pin.

Parameters
[in]otherThe pin to create a link to
Returns
True if it can create a link

◆ createLink()

bool NAV::InputPin::createLink ( OutputPin & startPin,
ax::NodeEditor::LinkId linkId = 0 )

Creates a link from this pin to another, calling all node specific callbacks.

Parameters
[in]startPinPin which should be linked to this pin
[in]linkIdId of the link to create
Returns
True if the link could be created

◆ isPinLinked()

bool NAV::InputPin::isPinLinked ( ) const

Checks if the pin is linked.

Returns
True if a link exists on this pin

◆ recreateLink()

bool NAV::InputPin::recreateLink ( OutputPin & startPin)

Destroys and recreates a link from this pin to another.

Parameters
[in]startPinPin which should be linked to this pin
Returns
True if the link could be created

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