0.5.1
Loading...
Searching...
No Matches
NAV::flow 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 ApplyChanges ()
 Signals that there have been changes to the flow.
void ClearAllNodeQueues ()
 Clears all nodes queues.
void DeleteAllNodes ()
 Delete all nodes.
bool DeleteNode (ax::NodeEditor::NodeId nodeId)
 Delete the node provided by id.
void DisableAllCallbacks ()
 Disables all Node callbacks.
void DiscardChanges ()
 Discards the unsaved changes flag. Does not really discard the changes.
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.
std::filesystem::path GetConfigPath ()
 Get the path where config files are searched.
std::string GetCurrentFilename ()
 Get the current filename of the open flow.
std::filesystem::path GetFlowPath ()
 Get the path where flow files are searched.
std::filesystem::path GetInputPath ()
 Get the path where data files are searched.
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.
std::filesystem::path GetOutputPath ()
 Get the path where logs and outputs are stored.
std::filesystem::path GetProgramRootPath ()
 Get the program root path.
bool HasUnsavedChanges ()
 Checks if the currently open flow has unsaved changes.
bool InitializeAllNodes ()
 Initializes all nodes.
void InitializeAllNodesAsync ()
 Initializes all nodes in a separate thread.
bool LoadFlow (const std::string &filepath)
 Loads the flow from the specified file.
bool LoadJson (const json &j, bool requestNewIds=false)
 Loads the nodes and links from the specified json object.
const std::vector< Node * > & m_Nodes ()
 List of all registered Nodes.
void SaveFlow (GlobalActions &globalAction)
 Saves the current flow into a file.
void SaveFlowAs (const std::string &filepath)
 Saves the current flow into the specified file.
void SetCurrentFilename (const std::string &newFilename)
 Set the current filename of the open flow.
void SetOutputPath ()
 Set the path where logs and outputs are stored.
void SetProgramRootPath (const std::filesystem::path &newRootPath)
 Set the program root path.
void UpdateNode (Node *node)
 Update the provided node object.

Function Documentation

◆ AddLink()

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

Adds the link.

Parameters
[in]linkIdUnique Id of the link

Definition at line 194 of file FlowManager.cpp.

◆ AddNode()

void NAV::flow::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 87 of file FlowManager.cpp.

◆ ApplyChanges()

void NAV::flow::ApplyChanges ( )

Signals that there have been changes to the flow.

Definition at line 682 of file FlowManager.cpp.

◆ ClearAllNodeQueues()

void NAV::flow::ClearAllNodeQueues ( )

Clears all nodes queues.

Definition at line 265 of file FlowManager.cpp.

◆ DeleteAllNodes()

void NAV::flow::DeleteAllNodes ( )

Delete all nodes.

Definition at line 180 of file FlowManager.cpp.

◆ DeleteNode()

bool NAV::flow::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 140 of file FlowManager.cpp.

◆ DisableAllCallbacks()

void NAV::flow::DisableAllCallbacks ( )

Disables all Node callbacks.

Definition at line 256 of file FlowManager.cpp.

◆ DiscardChanges()

void NAV::flow::DiscardChanges ( )

Discards the unsaved changes flag. Does not really discard the changes.

Definition at line 691 of file FlowManager.cpp.

◆ EnableAllCallbacks()

void NAV::flow::EnableAllCallbacks ( )

Enables all Node callbacks.

Definition at line 244 of file FlowManager.cpp.

◆ FindInputPin()

NAV::InputPin * NAV::flow::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 228 of file FlowManager.cpp.

◆ FindNode()

NAV::Node * NAV::flow::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 199 of file FlowManager.cpp.

◆ FindOutputPin()

NAV::OutputPin * NAV::flow::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 212 of file FlowManager.cpp.

◆ GetConfigPath()

std::filesystem::path NAV::flow::GetConfigPath ( )

Get the path where config files are searched.

Definition at line 799 of file FlowManager.cpp.

◆ GetCurrentFilename()

std::string NAV::flow::GetCurrentFilename ( )

Get the current filename of the open flow.

Returns
Current filename of the open flow

Definition at line 696 of file FlowManager.cpp.

◆ GetFlowPath()

std::filesystem::path NAV::flow::GetFlowPath ( )

Get the path where flow files are searched.

Definition at line 782 of file FlowManager.cpp.

◆ GetInputPath()

std::filesystem::path NAV::flow::GetInputPath ( )

Get the path where data files are searched.

Definition at line 765 of file FlowManager.cpp.

◆ GetNextLinkId()

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

Generates a new link id.

Definition at line 77 of file FlowManager.cpp.

◆ GetNextNodeId()

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

Generates a new node id.

Definition at line 72 of file FlowManager.cpp.

◆ GetNextPinId()

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

Generates a new pin id.

Definition at line 82 of file FlowManager.cpp.

◆ GetOutputPath()

std::filesystem::path NAV::flow::GetOutputPath ( )

Get the path where logs and outputs are stored.

Definition at line 717 of file FlowManager.cpp.

◆ GetProgramRootPath()

std::filesystem::path NAV::flow::GetProgramRootPath ( )

Get the program root path.

Returns
The path to the program root

Definition at line 706 of file FlowManager.cpp.

◆ HasUnsavedChanges()

bool NAV::flow::HasUnsavedChanges ( )

Checks if the currently open flow has unsaved changes.

Returns
True if there are changes

Definition at line 677 of file FlowManager.cpp.

◆ InitializeAllNodes()

bool NAV::flow::InitializeAllNodes ( )

Initializes all nodes.

Returns
Returns false if one of the nodes could not initialize

Definition at line 277 of file FlowManager.cpp.

◆ InitializeAllNodesAsync()

void NAV::flow::InitializeAllNodesAsync ( )

Initializes all nodes in a separate thread.

Definition at line 299 of file FlowManager.cpp.

◆ LoadFlow()

bool NAV::flow::LoadFlow ( const std::string & filepath)

Loads the flow from the specified file.

Parameters
[in]filepathPath where to load the flow
Returns
Whether the load was successfull

Definition at line 384 of file FlowManager.cpp.

◆ LoadJson()

bool NAV::flow::LoadJson ( const json & j,
bool requestNewIds = false )

Loads the nodes and links from the specified json object.

Parameters
[in]jJson object containing nodes and links to load
[in]requestNewIdsSet this true if the loaded nodes should receive new Ids (copy). False if the Ids should stay (cut/load)
Returns
Whether the load was successfull

Definition at line 453 of file FlowManager.cpp.

◆ m_Nodes()

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

List of all registered Nodes.

Definition at line 67 of file FlowManager.cpp.

◆ SaveFlow()

void NAV::flow::SaveFlow ( GlobalActions & globalAction)

Saves the current flow into a file.

Parameters
[out]globalActionIf currentfilename is empty this will be returned as GlobalActions::SaveAs

Definition at line 312 of file FlowManager.cpp.

◆ SaveFlowAs()

void NAV::flow::SaveFlowAs ( const std::string & filepath)

Saves the current flow into the specified file.

Parameters
[in]filepathPath where to save the flow

Definition at line 324 of file FlowManager.cpp.

◆ SetCurrentFilename()

void NAV::flow::SetCurrentFilename ( const std::string & newFilename)

Set the current filename of the open flow.

Parameters
[in]newFilenameNew filename of the flow

Definition at line 701 of file FlowManager.cpp.

◆ SetOutputPath()

void NAV::flow::SetOutputPath ( )

Set the path where logs and outputs are stored.

Definition at line 739 of file FlowManager.cpp.

◆ SetProgramRootPath()

void NAV::flow::SetProgramRootPath ( const std::filesystem::path & newRootPath)

Set the program root path.

Parameters
[in]newRootPathThe new program root path

Definition at line 711 of file FlowManager.cpp.

◆ UpdateNode()

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

Update the provided node object.

Parameters
[in]nodeNode object to add to the list

Definition at line 118 of file FlowManager.cpp.