0.3.0
Loading...
Searching...
No Matches
NAV::NodeManager Namespace Reference

Functions

void AddLink (ax::NodeEditor::LinkId linkId)
 Adds the link.
 
void AddNode (Node *node)
 Add the provided node object to the list of nodes.
 
void ClearAllNodeQueues ()
 Clears all nodes queues.
 
template<std::derived_from< Node > T>
InputPinCreateInputPin (Node *node, const char *name, Pin::Type pinType, const std::vector< std::string > &dataIdentifier, void(T::*notifyFunc)(const InsTime &, size_t), int idx=-1)
 Create an Input Pin object for data pins. The additional notify function gets called when the connected data was changed and the connected node calls NAV::Node::notifyOutputValueChanged.
 
InputPinCreateInputPin (Node *node, const char *name, Pin::Type pinType, const std::vector< std::string > &dataIdentifier={}, InputPin::Callback callback=static_cast< InputPin::FlowFirableCallbackFunc >(nullptr), InputPin::FlowFirableCheckFunc firable=nullptr, int priority=0, int idx=-1)
 Create an Input Pin object.
 
template<std::derived_from< Node > T>
InputPinCreateInputPin (Node *node, const char *name, Pin::Type pinType, const std::vector< std::string > &dataIdentifier={}, void(T::*callback)(InputPin::NodeDataQueue &, size_t)=nullptr, InputPin::FlowFirableCheckFunc firable=nullptr, int priority=0, int idx=-1)
 Create an Input Pin object.
 
OutputPinCreateOutputPin (Node *node, const char *name, Pin::Type pinType, const std::vector< std::string > &dataIdentifier, OutputPin::PinData data=static_cast< void * >(nullptr), int idx=-1)
 Create an Output Pin object.
 
template<std::derived_from< Node > T>
OutputPinCreateOutputPin (Node *node, const char *name, Pin::Type pinType, const std::vector< std::string > &dataIdentifier, std::shared_ptr< const NAV::NodeData >(T::*peekPollDataFunc)(size_t, bool)=nullptr, int idx=-1)
 Create an Output Pin object for Flow Pins.
 
template<std::derived_from< Node > T>
OutputPinCreateOutputPin (Node *node, const char *name, Pin::Type pinType, const std::vector< std::string > &dataIdentifier, std::shared_ptr< const NAV::NodeData >(T::*pollDataFunc)()=nullptr, int idx=-1)
 Create an Output Pin object for Flow Pins.
 
void DeleteAllNodes ()
 Delete all nodes.
 
bool DeleteInputPin (InputPin &pin)
 Deletes the input pin. Invalidates the pin reference given.
 
bool DeleteNode (ax::NodeEditor::NodeId nodeId)
 Delete the node provided by id.
 
bool DeleteOutputPin (OutputPin &pin)
 Deletes the output pin. Invalidates the pin reference given.
 
void DisableAllCallbacks ()
 Disables all Node callbacks.
 
void EnableAllCallbacks ()
 Enables all Node callbacks.
 
InputPinFindInputPin (ax::NodeEditor::PinId id)
 Finds the Pin for the PinId.
 
NodeFindNode (ax::NodeEditor::NodeId id)
 Finds the Node for the NodeId.
 
OutputPinFindOutputPin (ax::NodeEditor::PinId id)
 Finds the Pin for the PinId.
 
ax::NodeEditor::LinkId GetNextLinkId ()
 Generates a new link id.
 
ax::NodeEditor::NodeId GetNextNodeId ()
 Generates a new node id.
 
ax::NodeEditor::PinId GetNextPinId ()
 Generates a new pin id.
 
bool InitializeAllNodes ()
 Initializes all nodes.
 
void InitializeAllNodesAsync ()
 Initializes all nodes in a separate thread.
 
const std::vector< Node * > & m_Nodes ()
 List of all registered Nodes.
 
void UpdateNode (Node *node)
 Update the provided node object.
 

Variables

bool showFlowWhenInvokingCallbacks
 Flag if invokeCallbacks triggers a GUI Flow event.
 
bool showFlowWhenNotifyingValueChange
 Flag if notifyOutputValueChanged & notifyInputValueChanged triggers a GUI Flow event.
 

Function Documentation

◆ AddLink()

void NAV::NodeManager::AddLink ( ax::NodeEditor::LinkId linkId)

Adds the link.

Parameters
[in]linkIdUnique Id of the link

Definition at line 171 of file NodeManager.cpp.

◆ AddNode()

void NAV::NodeManager::AddNode ( NAV::Node * node)

Add the provided node object to the list of nodes.

Parameters
[in]nodeNode object to add to the list

Definition at line 60 of file NodeManager.cpp.

◆ ClearAllNodeQueues()

void NAV::NodeManager::ClearAllNodeQueues ( )

Clears all nodes queues.

Definition at line 341 of file NodeManager.cpp.

◆ CreateInputPin() [1/3]

template<std::derived_from< Node > T>
InputPin * NAV::NodeManager::CreateInputPin ( Node * node,
const char * name,
Pin::Type pinType,
const std::vector< std::string > & dataIdentifier,
void(T::* notifyFunc )(const InsTime &, size_t),
int idx = -1 )

Create an Input Pin object for data pins. The additional notify function gets called when the connected data was changed and the connected node calls NAV::Node::notifyOutputValueChanged.

Template Parameters
TNode Class where the function is member of
Parameters
[in]nodeNode to register the Pin for
[in]nameDisplay name of the Pin
[in]pinTypeType of the pin
[in]dataIdentifierIdentifier of the data which is represented by the pin
[in]notifyFuncFunction to call when the data is updated
[in]idxIndex where to put the new pin (-1 means at the end)
Returns
Pointer to the created pin

Definition at line 105 of file NodeManager.hpp.

◆ CreateInputPin() [2/3]

NAV::InputPin * NAV::NodeManager::CreateInputPin ( NAV::Node * node,
const char * name,
Pin::Type pinType,
const std::vector< std::string > & dataIdentifier = {},
InputPin::Callback callback = static_cast<InputPin::FlowFirableCallbackFunc>(nullptr),
InputPin::FlowFirableCheckFunc firable = nullptr,
int priority = 0,
int idx = -1 )

Create an Input Pin object.

Parameters
[in]nodeNode to register the Pin for
[in]nameDisplay name of the Pin
[in]pinTypeType of the pin
[in]dataIdentifierIdentifier of the data which is represented by the pin
[in]callbackCallback to register with the pin
[in]firableFunction to check whether the callback is firable
[in]priorityPriority when checking firable condition related to other pins (higher priority gets triggered first)
[in]idxIndex where to put the new pin (-1 means at the end)
Returns
Pointer to the created pin

Definition at line 176 of file NodeManager.cpp.

◆ CreateInputPin() [3/3]

template<std::derived_from< Node > T>
InputPin * NAV::NodeManager::CreateInputPin ( Node * node,
const char * name,
Pin::Type pinType,
const std::vector< std::string > & dataIdentifier = {},
void(T::* callback )(InputPin::NodeDataQueue &, size_t) = nullptr,
InputPin::FlowFirableCheckFunc firable = nullptr,
int priority = 0,
int idx = -1 )

Create an Input Pin object.

Template Parameters
TNode Class where the function is member of
Parameters
[in]nodeNode to register the Pin for
[in]nameDisplay name of the Pin
[in]pinTypeType of the pin
[in]dataIdentifierIdentifier of the data which is represented by the pin
[in]callbackFlow firable callback function to register with the pin
[in]firableFunction to check whether the callback is firable
[in]priorityPriority when checking firable condition related to other pins (higher priority gets triggered first)
[in]idxIndex where to put the new pin (-1 means at the end)
Returns
Pointer to the created pin

Definition at line 85 of file NodeManager.hpp.

◆ CreateOutputPin() [1/3]

NAV::OutputPin * NAV::NodeManager::CreateOutputPin ( NAV::Node * node,
const char * name,
Pin::Type pinType,
const std::vector< std::string > & dataIdentifier,
OutputPin::PinData data = static_cast<void*>(nullptr),
int idx = -1 )

Create an Output Pin object.

Parameters
[in]nodeNode to register the Pin for
[in]nameDisplay name of the Pin
[in]pinTypeType of the pin
[in]dataIdentifierIdentifier of the data which is represented by the pin
[in]dataPointer to data which is represented by the pin
[in]idxIndex where to put the new pin (-1 means at the end)
Returns
Pointer to the created pin

Definition at line 202 of file NodeManager.cpp.

◆ CreateOutputPin() [2/3]

template<std::derived_from< Node > T>
OutputPin * NAV::NodeManager::CreateOutputPin ( Node * node,
const char * name,
Pin::Type pinType,
const std::vector< std::string > & dataIdentifier,
std::shared_ptr< const NAV::NodeData >(T::* peekPollDataFunc )(size_t, bool) = nullptr,
int idx = -1 )

Create an Output Pin object for Flow Pins.

Template Parameters
TClass where the function is member of
Parameters
[in]nodeNode to register the Pin for
[in]nameDisplay name of the Pin
[in]pinTypeType of the pin
[in]dataIdentifierIdentifier of the data which is represented by the pin
[in]peekPollDataFuncFunction to poll for data on this pin
[in]idxIndex where to put the new pin (-1 means at the end)
Returns
Pointer to the created pin

Definition at line 133 of file NodeManager.hpp.

◆ CreateOutputPin() [3/3]

template<std::derived_from< Node > T>
OutputPin * NAV::NodeManager::CreateOutputPin ( Node * node,
const char * name,
Pin::Type pinType,
const std::vector< std::string > & dataIdentifier,
std::shared_ptr< const NAV::NodeData >(T::* pollDataFunc )() = nullptr,
int idx = -1 )

Create an Output Pin object for Flow Pins.

Template Parameters
TClass where the function is member of
Parameters
[in]nodeNode to register the Pin for
[in]nameDisplay name of the Pin
[in]pinTypeType of the pin
[in]dataIdentifierIdentifier of the data which is represented by the pin
[in]pollDataFuncFunction to poll for data on this pin
[in]idxIndex where to put the new pin (-1 means at the end)
Returns
Pointer to the created pin

Definition at line 154 of file NodeManager.hpp.

◆ DeleteAllNodes()

void NAV::NodeManager::DeleteAllNodes ( )

Delete all nodes.

Definition at line 153 of file NodeManager.cpp.

◆ DeleteInputPin()

bool NAV::NodeManager::DeleteInputPin ( NAV::InputPin & pin)

Deletes the input pin. Invalidates the pin reference given.

Parameters
[in,out]pinInput Pin to delete
Returns
True if the pin was delete

Definition at line 234 of file NodeManager.cpp.

◆ DeleteNode()

bool NAV::NodeManager::DeleteNode ( ax::NodeEditor::NodeId nodeId)

Delete the node provided by id.

Parameters
[in]nodeIdUnique Id of the Node to delete
Returns
True if delete was successful, false if NodeId does not exist

Definition at line 113 of file NodeManager.cpp.

◆ DeleteOutputPin()

bool NAV::NodeManager::DeleteOutputPin ( NAV::OutputPin & pin)

Deletes the output pin. Invalidates the pin reference given.

Parameters
[in,out]pinOutput Pin to delete
Returns
True if the pin was delete

Definition at line 222 of file NodeManager.cpp.

◆ DisableAllCallbacks()

void NAV::NodeManager::DisableAllCallbacks ( )

Disables all Node callbacks.

Definition at line 332 of file NodeManager.cpp.

◆ EnableAllCallbacks()

void NAV::NodeManager::EnableAllCallbacks ( )

Enables all Node callbacks.

Definition at line 320 of file NodeManager.cpp.

◆ FindInputPin()

NAV::InputPin * NAV::NodeManager::FindInputPin ( ax::NodeEditor::PinId id)

Finds the Pin for the PinId.

Parameters
[in]idUnique Id of the Pin to search for
Returns
Pointer to the pin or nullptr if the PinId does not exist

Definition at line 304 of file NodeManager.cpp.

◆ FindNode()

NAV::Node * NAV::NodeManager::FindNode ( ax::NodeEditor::NodeId id)

Finds the Node for the NodeId.

Parameters
[in]idUnique Id of the Node to search for
Returns
Pointer to the node or nullptr if the NodeId does not exist

Definition at line 275 of file NodeManager.cpp.

◆ FindOutputPin()

NAV::OutputPin * NAV::NodeManager::FindOutputPin ( ax::NodeEditor::PinId id)

Finds the Pin for the PinId.

Parameters
[in]idUnique Id of the Pin to search for
Returns
Pointer to the pin or nullptr if the PinId does not exist

Definition at line 288 of file NodeManager.cpp.

◆ GetNextLinkId()

ax::NodeEditor::LinkId NAV::NodeManager::GetNextLinkId ( )

Generates a new link id.

Definition at line 265 of file NodeManager.cpp.

◆ GetNextNodeId()

ax::NodeEditor::NodeId NAV::NodeManager::GetNextNodeId ( )

Generates a new node id.

Definition at line 260 of file NodeManager.cpp.

◆ GetNextPinId()

ax::NodeEditor::PinId NAV::NodeManager::GetNextPinId ( )

Generates a new pin id.

Definition at line 270 of file NodeManager.cpp.

◆ InitializeAllNodes()

bool NAV::NodeManager::InitializeAllNodes ( )

Initializes all nodes.

Returns
Returns false if one of the nodes could not initialize

Definition at line 353 of file NodeManager.cpp.

◆ InitializeAllNodesAsync()

void NAV::NodeManager::InitializeAllNodesAsync ( )

Initializes all nodes in a separate thread.

Definition at line 375 of file NodeManager.cpp.

◆ m_Nodes()

const std::vector< NAV::Node * > & NAV::NodeManager::m_Nodes ( )

List of all registered Nodes.

Definition at line 55 of file NodeManager.cpp.

◆ UpdateNode()

void NAV::NodeManager::UpdateNode ( Node * node)

Update the provided node object.

Parameters
[in]nodeNode object to add to the list

Definition at line 91 of file NodeManager.cpp.

Variable Documentation

◆ showFlowWhenInvokingCallbacks

bool NAV::NodeManager::showFlowWhenInvokingCallbacks

Flag if invokeCallbacks triggers a GUI Flow event.

Definition at line 42 of file NodeManager.cpp.

◆ showFlowWhenNotifyingValueChange

bool NAV::NodeManager::showFlowWhenNotifyingValueChange

Flag if notifyOutputValueChanged & notifyInputValueChanged triggers a GUI Flow event.

Definition at line 43 of file NodeManager.cpp.