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

Input pins of nodes. More...

Data Structures

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.
 

Data Fields

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.
 
- Data Fields 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.
 

Private Member Functions

void connect (OutputPin &startPin, ax::NodeEditor::LinkId linkId=0)
 Connects this pin to another.
 
void disconnect ()
 Disconnects the link.
 

Friends

class OutputPin
 
class 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.

Definition at line 490 of file Pin.hpp.

Member Typedef Documentation

◆ Callback

Callback function types.

Definition at line 718 of file Pin.hpp.

◆ 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

Definition at line 716 of file Pin.hpp.

◆ 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

Definition at line 712 of file Pin.hpp.

◆ FlowFirableCheckFunc

Function type to call when checking if a pin is firable.

Definition at line 725 of file Pin.hpp.

◆ NodeDataQueue

Node data queue type.

Definition at line 707 of file Pin.hpp.

Constructor & Destructor Documentation

◆ InputPin() [1/4]

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

Definition at line 498 of file Pin.hpp.

◆ InputPin() [2/4]

NAV::InputPin::InputPin ( )
default

Default constructor (for serialization)

◆ ~InputPin()

NAV::InputPin::~InputPin ( )
default

Destructor.

◆ InputPin() [3/4]

NAV::InputPin::InputPin ( const InputPin & )
delete

Copy constructor.

◆ InputPin() [4/4]

NAV::InputPin::InputPin ( InputPin && other)
inlinenoexcept

Move constructor.

Definition at line 508 of file Pin.hpp.

Member Function Documentation

◆ canCreateLink()

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

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

Definition at line 350 of file Pin.cpp.

◆ connect()

void NAV::InputPin::connect ( NAV::OutputPin & startPin,
ax::NodeEditor::LinkId linkId = 0 )
private

Connects this pin to another.

Parameters
[in]startPinPin which should be linked to this pin
[in]linkIdId of the link to create

Definition at line 378 of file Pin.cpp.

◆ 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

Definition at line 360 of file Pin.cpp.

◆ deleteLink()

void NAV::InputPin::deleteLink ( )

Disconnects the link.

Definition at line 370 of file Pin.cpp.

◆ disconnect()

void NAV::InputPin::disconnect ( )
private

Disconnects the link.

Definition at line 414 of file Pin.cpp.

◆ isPinLinked()

bool NAV::InputPin::isPinLinked ( ) const
nodiscard

Checks if the pin is linked.

Returns
True if a link exists on this pin

Definition at line 355 of file Pin.cpp.

◆ operator=() [1/2]

InputPin & NAV::InputPin::operator= ( const InputPin & )
delete

Copy assignment operator.

◆ operator=() [2/2]

InputPin & NAV::InputPin::operator= ( InputPin && other)
inlinenoexcept

Move assignment operator.

Definition at line 522 of file Pin.hpp.

◆ 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

Definition at line 365 of file Pin.cpp.

Friends And Related Symbol Documentation

◆ OutputPin

friend class OutputPin
friend

Definition at line 764 of file Pin.hpp.

◆ Pin

friend class Pin
friend

Definition at line 763 of file Pin.hpp.

Field Documentation

◆ callback

Callback NAV::InputPin::callback

Callback to call when the node is firable or when it should be notified of data change.

Definition at line 722 of file Pin.hpp.

◆ dropQueueIfNotFirable

bool NAV::InputPin::dropQueueIfNotFirable

If true, drops elements from the queue if not firable, otherwise sleeps the worker.

Definition at line 737 of file Pin.hpp.

◆ firable

FlowFirableCheckFunc NAV::InputPin::firable

Function to check if the callback is firable.

Definition at line 728 of file Pin.hpp.

◆ link

IncomingLink NAV::InputPin::link

Info to identify the linked pin.

Definition at line 704 of file Pin.hpp.

◆ neededForTemporalQueueCheck

bool NAV::InputPin::neededForTemporalQueueCheck

Whether it should be checked for temporal ordering.

Definition at line 734 of file Pin.hpp.

◆ priority

int NAV::InputPin::priority

Priority when checking firable condition related to other pins (higher priority gets triggered first)

Definition at line 731 of file Pin.hpp.

◆ queue

NodeDataQueue NAV::InputPin::queue

Queue with received data.

Definition at line 743 of file Pin.hpp.

◆ queueBlocked

bool NAV::InputPin::queueBlocked

If true no more messages are accepted to the queue.

Definition at line 740 of file Pin.hpp.


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