22#include <nlohmann/json.hpp>
23using json = nlohmann::json;
28const std::vector<Node*>&
m_Nodes();
57void AddLink(ax::NodeEditor::LinkId linkId);
62Node*
FindNode(ax::NodeEditor::NodeId
id);
101bool LoadFlow(
const std::string& filepath);
107bool LoadJson(
const json& j,
bool requestNewIds =
false);
156void RegisterWatcherCallbackToInputPin(ax::NodeEditor::PinId
id,
const InputPin::WatcherCallback& callback);
162void RegisterWatcherCallbackToLink(ax::NodeEditor::LinkId
id,
const InputPin::WatcherCallback& callback);
165void ApplyWatcherCallbacks();
169void RegisterPreInitCallback(std::function<
void()> callback);
172void CallPreInitCallback();
176void RegisterCleanupCallback(std::function<
void()> callback);
179void CallCleanupCallback();
182void ClearRegisteredCallbacks();
nlohmann::json json
json namespace
GlobalActions
Possible Global Actions to perform in the GUI.
void UpdateNode(Node *node)
Update the provided node object.
InputPin * FindInputPin(ax::NodeEditor::PinId id)
Finds the Pin for the PinId.
ax::NodeEditor::LinkId GetNextLinkId()
Generates a new link id.
const std::vector< Node * > & m_Nodes()
List of all registered Nodes.
Node * FindNode(ax::NodeEditor::NodeId id)
Finds the Node for the NodeId.
void SetProgramRootPath(const std::filesystem::path &newRootPath)
Set the program root path.
bool LoadJson(const json &j, bool requestNewIds=false)
Loads the nodes and links from the specified json object.
void SetCurrentFilename(const std::string &newFilename)
Set the current filename of the open flow.
bool LoadFlow(const std::string &filepath)
Loads the flow from the specified file.
void DisableAllCallbacks()
Disables all Node callbacks.
std::filesystem::path GetConfigPath()
Get the path where config files are searched.
std::filesystem::path GetOutputPath()
Get the path where logs and outputs are stored.
void DeleteAllNodes()
Delete all nodes.
void SaveFlowAs(const std::string &filepath)
Saves the current flow into the specified file.
std::filesystem::path GetInputPath()
Get the path where data files are searched.
void DiscardChanges()
Discards the unsaved changes flag. Does not really discard the changes.
bool DeleteNode(ax::NodeEditor::NodeId nodeId)
Delete the node provided by id.
ax::NodeEditor::PinId GetNextPinId()
Generates a new pin id.
std::string GetCurrentFilename()
Get the current filename of the open flow.
void ApplyChanges()
Signals that there have been changes to the flow.
ax::NodeEditor::NodeId GetNextNodeId()
Generates a new node id.
void AddLink(ax::NodeEditor::LinkId linkId)
Adds the link.
std::filesystem::path GetFlowPath()
Get the path where flow files are searched.
void ClearAllNodeQueues()
Clears all nodes queues.
OutputPin * FindOutputPin(ax::NodeEditor::PinId id)
Finds the Pin for the PinId.
void EnableAllCallbacks()
Enables all Node callbacks.
std::filesystem::path GetProgramRootPath()
Get the program root path.
bool HasUnsavedChanges()
Checks if the currently open flow has unsaved changes.
void SaveFlow(GlobalActions &globalAction)
Saves the current flow into a file.
void SetOutputPath()
Set the path where logs and outputs are stored.
void AddNode(Node *node)
Add the provided node object to the list of nodes.
bool InitializeAllNodes()
Initializes all nodes.
void InitializeAllNodesAsync()
Initializes all nodes in a separate thread.