0.2.0
Loading...
Searching...
No Matches
FlowManager.hpp File Reference

Save/Load the Nodes. More...

Go to the source code of this file.

Typedefs

using json
 json namespace
 

Functions

void NAV::flow::ApplyChanges ()
 Signals that there have been changes to the flow.
 
void NAV::flow::DiscardChanges ()
 Discards the unsaved changes flag. Does not really discard the changes.
 
std::filesystem::path NAV::flow::GetConfigPath ()
 Get the path where config files are searched.
 
std::string NAV::flow::GetCurrentFilename ()
 Get the current filename of the open flow.
 
std::filesystem::path NAV::flow::GetFlowPath ()
 Get the path where flow files are searched.
 
std::filesystem::path NAV::flow::GetInputPath ()
 Get the path where data files are searched.
 
std::filesystem::path NAV::flow::GetOutputPath ()
 Get the path where logs and outputs are stored.
 
std::filesystem::path NAV::flow::GetProgramRootPath ()
 Get the program root path.
 
bool NAV::flow::HasUnsavedChanges ()
 Checks if the currently open flow has unsaved changes.
 
bool NAV::flow::LoadFlow (const std::string &filepath)
 Loads the flow from the specified file.
 
bool NAV::flow::LoadJson (const json &j, bool requestNewIds=false)
 Loads the nodes and links from the specified json object.
 
void NAV::flow::SaveFlow (GlobalActions &globalAction)
 Saves the current flow into a file.
 
void NAV::flow::SaveFlowAs (const std::string &filepath)
 Saves the current flow into the specified file.
 
void NAV::flow::SetCurrentFilename (const std::string &newFilename)
 Set the current filename of the open flow.
 
void NAV::flow::SetOutputPath ()
 Set the path where logs and outputs are stored.
 
void NAV::flow::SetProgramRootPath (const std::filesystem::path &newRootPath)
 Set the program root path.
 

Variables

int NAV::flow::loadingFrameCount
 Frame Count when changes were loaded to prevent nodes moving from triggering unsaved changes.
 
bool NAV::flow::saveLastActions
 Whether actions should be saved to the last actions list.
 

Detailed Description

Save/Load the Nodes.

Author
T. Topp (topp@.nosp@m.ins..nosp@m.uni-s.nosp@m.tutt.nosp@m.gart..nosp@m.de)
Date
2020-12-16

Function Documentation

◆ GetCurrentFilename()

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

Get the current filename of the open flow.

Returns
Current filename of the open flow

◆ GetProgramRootPath()

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

Get the program root path.

Returns
The path to the program root

◆ HasUnsavedChanges()

bool NAV::flow::HasUnsavedChanges ( )

Checks if the currently open flow has unsaved changes.

Returns
True if there are changes

◆ 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

◆ 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

◆ 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

◆ 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

◆ SetCurrentFilename()

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

Set the current filename of the open flow.

Parameters
[in]newFilenameNew filename of the flow

◆ SetProgramRootPath()

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

Set the program root path.

Parameters
[in]newRootPathThe new program root path