WSF
wizard::Project Class Reference

A WSF 'project'. Manages WSF sources files in a WSF project. More...

#include <Project.hpp>

Inherits QObject, and UtReferenceTracked.

Public Types

typedef UtCallbackN< void()> ParseCompleteCallback

Public Slots

void ShowStartupFileDialog ()

Signals

void ParseUpdatedFull ()
void EventPipeRunConfigurationChanged ()
void Closed ()

Public Member Functions

 Project (ProjectWorkspace *aWorkspacePtr)
 Project (const Project &)=delete
 Project (Project &&)=default
Projectoperator= (const Project &)=delete
Projectoperator= (Project &&)=default
 ~Project () override
QString Name () const
TextSourceCacheGetSourceCache ()
void AddComponent (const std::string &aName, std::unique_ptr< ProjectComponent > aComponent)
ProjectComponentFindComponent (const std::string &aName)
const UtPath & ProjectDirectory () const
bool SetProjectLocation (const UtPath &aProjDirPath, const UtPath &aProjFilePath)
bool SetProjectDirectory (const UtPath &aPath)
bool SetProjectFilePath (const UtPath &aPath)
long long GetMinimumSequenceNumber ()
AttributeSetFindOptions (const WsfPProxyNode &aNode)
AttributeSetFindOptions (const WsfPProxyPath &aPath)
AttributeSetGetOptions (const WsfPProxyNode &aNode)
std::vector< UtPath > MapSearchPath () const
 Paths to be searched for map data relating to this project.
RevisionStoreGetRevisionStore ()
void GotoRange (const UtTextDocumentRange &aRange)
EditorGotoFile (UtTextDocument *aSourcePtr, bool aRecordLocation=false)
EditorGotoFile (const std::string &aFilePath, bool aRecordLocation=true)
void WaitForParsing ()
 Waits until the parsing thread is complete. This should only be called from the main thread.
void SaveAll (bool aSkipProject=true)
void TriggerReparse ()
void InvalidateScenario (bool aInvalidateProxy=false)
void FindIncludes (TextSource *aSourcePtr)
bool SourceReloaded (TextSource *aSourcePtr)
ProjectWorkspaceGetWorkspace () const
const std::string & GetMapItemsXML () const
void SetMapItemsXML (const std::string &aXml)
const std::vector< UtPath > & GetStartupFiles ()
void SetStartupFiles (const std::vector< UtPath > &aMainFiles)
const std::vector< UtPath > & GetProjectDirectories () const
bool AddProjectDirectory (const UtPath &aPath)
void RemoveProjectDirectory (const UtPath &aPath)
bool IsDirectoryInProject (const UtPath &aPath) const
void ShowSettings ()
void SetWorkingDirectory (const UtPath &aPath)
WsfExeGetExe () const
void SetExe (WsfExe *aExePtr, bool aEmit)
void SetCommandLineArgs (const QString &aArgs)
void ExeUpdated (WsfExe *aExePtr)
void WaitForAllParsing ()
ParseResultsTakeParseResults ()
bool IncludesFile (TextSource *aSourcePtr)
bool IncludesStartupFile (TextSource *aSourcePtr)
void GiveParseResults ()
void ProxyReady (std::unique_ptr< WsfPProxy > aProxy, std::unique_ptr< ProxyHash > aProxyHashPtr)
void ExportProjectAction ()
ParseWorkerGetParseWorker ()
void InitParseResults ()
ParseCompleteCallbackExecuteWhenParseComplete (ParseCompleteCallback *aCallbackPtr)
const UtPath & WorkingDirectory () const
bool ParseIsUpToDate () const
double GetLastGrammarParseTime () const noexcept
double GetLastInputParseTime () const noexcept
double GetLastProxyDeserializeTime () const noexcept
double GetLastProxyMergeGUI_Time () const noexcept
QString GetCommandLineArgs () const
ParseResultsGetParseResults ()
ParseResultsTinyTinyParseResults ()
ParseResultsWaitForParseResults () const
void ToXML (XML_Context &aContext) const
bool FromXML (XML_Context &aContext)
bool FromXML_StartupFile (XML_Context &aContext)
bool SaveAs ()
bool SaveProject ()
bool ProjectFilePath (UtPath &aFilePath) const
bool CloseProject (bool aForce=false)
CacheSourceProviderSourceProvider () const
WsfPProxyProxy () const
void HandleProxyNodeMoved (const WsfPProxyNode &, const WsfPProxyNode &)
void AddProjectDirectoryBrowse ()
void ShowRevisionManager ()
bool OpenFile (const std::string &aFilePath)
bool OpenFileInTextEditor (const std::string &aFilePath)
QString GetCmdLineArgs () const
void OpenAction ()
void BuildUpContextMenu (QMenu &aMenu)
void UpdateProxyEpoch (const wizard::ProxyChange &aProxyChange)
void UpdateProxyEpoch ()
UtCalendar GetStartDateTime () const

Static Public Member Functions

static ProjectInstance ()
static QString GetDefaultCommandLineArgs ()

Public Attributes

UtCallbackListN< void(bool)> ParseUpdated
 Called whenever a parse is complete, as many as once per source modification.
UtCallbackListN< void(bool)> ParseUpdatedDeferred
UtCallbackListN< void()> MainFileListChange

Static Public Attributes

static UtCallbackListN< void(Project *)> ProjectClosing
static UtCallbackListN< void(Project *)> RegisterComponents

Friends

class ParseWorker
class ProjectWorkspace
class ProjectParseThread

Detailed Description

A WSF 'project'. Manages WSF sources files in a WSF project.

Member Typedef Documentation

◆ ParseCompleteCallback

typedef UtCallbackN<void()> wizard::Project::ParseCompleteCallback

Constructor & Destructor Documentation

◆ Project() [1/3]

◆ Project() [2/3]

wizard::Project::Project ( const Project & )
delete

References Project().

◆ Project() [3/3]

wizard::Project::Project ( Project && )
default

References Project().

◆ ~Project()

wizard::Project::~Project ( )
override

References gProjectPtr, and wizSignals.

Member Function Documentation

◆ AddComponent()

void wizard::Project::AddComponent ( const std::string & aName,
std::unique_ptr< ProjectComponent > aComponent )

Referenced by operator=().

◆ AddProjectDirectory()

bool wizard::Project::AddProjectDirectory ( const UtPath & aPath)

References wizSignals.

Referenced by AddProjectDirectoryBrowse().

◆ AddProjectDirectoryBrowse()

void wizard::Project::AddProjectDirectoryBrowse ( )

References AddProjectDirectory().

◆ BuildUpContextMenu()

void wizard::Project::BuildUpContextMenu ( QMenu & aMenu)

◆ Closed

void wizard::Project::Closed ( )
signal

References ShowStartupFileDialog().

Referenced by CloseProject().

◆ CloseProject()

bool wizard::Project::CloseProject ( bool aForce = false)

◆ EventPipeRunConfigurationChanged

void wizard::Project::EventPipeRunConfigurationChanged ( )
signal

◆ ExecuteWhenParseComplete()

wizard::Project::ParseCompleteCallback * wizard::Project::ExecuteWhenParseComplete ( ParseCompleteCallback * aCallbackPtr)

◆ ExeUpdated()

void wizard::Project::ExeUpdated ( WsfExe * aExePtr)

References GetExe(), InitParseResults(), and InvalidateScenario().

Referenced by Project().

◆ ExportProjectAction()

void wizard::Project::ExportProjectAction ( )

◆ FindComponent()

wizard::ProjectComponent * wizard::Project::FindComponent ( const std::string & aName)

Referenced by operator=().

◆ FindIncludes()

void wizard::Project::FindIncludes ( TextSource * aSourcePtr)

◆ FindOptions() [1/2]

◆ FindOptions() [2/2]

wizard::AttributeSet * wizard::Project::FindOptions ( const WsfPProxyPath & aPath)

◆ FromXML()

◆ FromXML_StartupFile()

bool wizard::Project::FromXML_StartupFile ( XML_Context & aContext)

References wizard::XML_Context::GetReader().

Referenced by FromXML().

◆ GetCmdLineArgs()

QString wizard::Project::GetCmdLineArgs ( ) const
inline

◆ GetCommandLineArgs()

QString wizard::Project::GetCommandLineArgs ( ) const
inline

◆ GetDefaultCommandLineArgs()

QString wizard::Project::GetDefaultCommandLineArgs ( )
static

◆ GetExe()

◆ GetLastGrammarParseTime()

double wizard::Project::GetLastGrammarParseTime ( ) const
inlinenoexcept

Get the time the WsfParseDefinitions spent parsing the WsfGrammar

Returns
the latest grammar parsing time

◆ GetLastInputParseTime()

double wizard::Project::GetLastInputParseTime ( ) const
inlinenoexcept

Get the time the WsfParser spent parsing the input files

Returns
the latest input parsing time

◆ GetLastProxyDeserializeTime()

double wizard::Project::GetLastProxyDeserializeTime ( ) const
inlinenoexcept

Get the time the WsfPProxyDeserialize spent deserializing the parse tree

Returns
the latest proxy deserializing time

◆ GetLastProxyMergeGUI_Time()

double wizard::Project::GetLastProxyMergeGUI_Time ( ) const
inlinenoexcept

Get the time the ProxyMerge spent merging the old and new WsfPProxys/Wizard spent updating its GUIs

Returns
the latest proxy merging/GUI updating time

◆ GetMapItemsXML()

const std::string & wizard::Project::GetMapItemsXML ( ) const
inline

◆ GetMinimumSequenceNumber()

long long wizard::Project::GetMinimumSequenceNumber ( )

◆ GetOptions()

◆ GetParseResults()

◆ GetParseWorker()

ParseWorker * wizard::Project::GetParseWorker ( )
inline

◆ GetProjectDirectories()

const std::vector< UtPath > & wizard::Project::GetProjectDirectories ( ) const
inline

◆ GetRevisionStore()

wizard::RevisionStore & wizard::Project::GetRevisionStore ( )

◆ GetSourceCache()

◆ GetStartDateTime()

UtCalendar wizard::Project::GetStartDateTime ( ) const
inline

◆ GetStartupFiles()

const std::vector< UtPath > & wizard::Project::GetStartupFiles ( )

◆ GetWorkspace()

◆ GiveParseResults()

void wizard::Project::GiveParseResults ( )

◆ GotoFile() [1/2]

wizard::Editor * wizard::Project::GotoFile ( const std::string & aFilePath,
bool aRecordLocation = true )

◆ GotoFile() [2/2]

wizard::Editor * wizard::Project::GotoFile ( UtTextDocument * aSourcePtr,
bool aRecordLocation = false )

◆ GotoRange()

◆ HandleProxyNodeMoved()

void wizard::Project::HandleProxyNodeMoved ( const WsfPProxyNode & aSrc,
const WsfPProxyNode & aDest )

◆ IncludesFile()

bool wizard::Project::IncludesFile ( TextSource * aSourcePtr)

◆ IncludesStartupFile()

bool wizard::Project::IncludesStartupFile ( TextSource * aSourcePtr)

◆ InitParseResults()

void wizard::Project::InitParseResults ( )

Referenced by ExeUpdated(), and Project().

◆ Instance()

◆ InvalidateScenario()

void wizard::Project::InvalidateScenario ( bool aInvalidateProxy = false)

◆ IsDirectoryInProject()

bool wizard::Project::IsDirectoryInProject ( const UtPath & aPath) const

Referenced by BuildUpContextMenu().

◆ MapSearchPath()

std::vector< UtPath > wizard::Project::MapSearchPath ( ) const

Paths to be searched for map data relating to this project.

References GetRevisionStore().

◆ Name()

QString wizard::Project::Name ( ) const

Referenced by operator=().

◆ OpenAction()

void wizard::Project::OpenAction ( )

References GotoFile().

◆ OpenFile()

bool wizard::Project::OpenFile ( const std::string & aFilePath)

◆ OpenFileInTextEditor()

bool wizard::Project::OpenFileInTextEditor ( const std::string & aFilePath)

◆ operator=() [1/2]

Project & wizard::Project::operator= ( const Project & )
delete

References Project().

◆ operator=() [2/2]

Project & wizard::Project::operator= ( Project && )
default

◆ ParseIsUpToDate()

bool wizard::Project::ParseIsUpToDate ( ) const
inline

◆ ParseUpdatedFull

void wizard::Project::ParseUpdatedFull ( )
signal

◆ ProjectDirectory()

const UtPath & wizard::Project::ProjectDirectory ( ) const
inline

Returns the directory WSF is expected to run from. This is important for finding includes with relative paths.

Referenced by wizard::ProjectSettingsDialog::Open(), ShowStartupFileDialog(), ToXML(), and wizard::RenameFileDialog::UpdateList().

◆ ProjectFilePath()

bool wizard::Project::ProjectFilePath ( UtPath & aFilePath) const

◆ Proxy()

WsfPProxy * wizard::Project::Proxy ( ) const

◆ ProxyReady()

◆ RemoveProjectDirectory()

void wizard::Project::RemoveProjectDirectory ( const UtPath & aPath)

References wizSignals.

◆ SaveAll()

void wizard::Project::SaveAll ( bool aSkipProject = true)

References GetSourceCache(), and SaveProject().

Referenced by SaveProject().

◆ SaveAs()

bool wizard::Project::SaveAs ( )

References SaveProject(), and SetProjectFilePath().

Referenced by SaveProject().

◆ SaveProject()

bool wizard::Project::SaveProject ( )

References SaveAll(), and SaveAs().

Referenced by SaveAll(), and SaveAs().

◆ SetCommandLineArgs()

void wizard::Project::SetCommandLineArgs ( const QString & aArgs)

◆ SetExe()

void wizard::Project::SetExe ( WsfExe * aExePtr,
bool aEmit )

◆ SetMapItemsXML()

void wizard::Project::SetMapItemsXML ( const std::string & aXml)
inline

◆ SetProjectDirectory()

bool wizard::Project::SetProjectDirectory ( const UtPath & aPath)

◆ SetProjectFilePath()

bool wizard::Project::SetProjectFilePath ( const UtPath & aPath)

References SetProjectLocation().

Referenced by SaveAs().

◆ SetProjectLocation()

bool wizard::Project::SetProjectLocation ( const UtPath & aProjDirPath,
const UtPath & aProjFilePath )

◆ SetStartupFiles()

void wizard::Project::SetStartupFiles ( const std::vector< UtPath > & aMainFiles)

◆ SetWorkingDirectory()

void wizard::Project::SetWorkingDirectory ( const UtPath & aPath)

◆ ShowRevisionManager()

void wizard::Project::ShowRevisionManager ( )

References WorkingDirectory().

◆ ShowSettings()

void wizard::Project::ShowSettings ( )

References wizEnv.

◆ ShowStartupFileDialog

void wizard::Project::ShowStartupFileDialog ( )
slot

◆ SourceProvider()

CacheSourceProvider * wizard::Project::SourceProvider ( ) const
inline

◆ SourceReloaded()

bool wizard::Project::SourceReloaded ( TextSource * aSourcePtr)

Called when a project item has been reloaded. This method should return 'true' when the source needs to be parsed

References wizard::ParseResultsTiny::IncludesFile(), and TinyParseResults().

◆ TakeParseResults()

wizard::ParseResults * wizard::Project::TakeParseResults ( )

◆ TinyParseResults()

ParseResultsTiny * wizard::Project::TinyParseResults ( )
inline

◆ ToXML()

◆ TriggerReparse()

void wizard::Project::TriggerReparse ( )

◆ UpdateProxyEpoch() [1/2]

◆ UpdateProxyEpoch() [2/2]

void wizard::Project::UpdateProxyEpoch ( const wizard::ProxyChange & aProxyChange)

References UpdateProxyEpoch().

Referenced by ProxyReady(), and UpdateProxyEpoch().

◆ WaitForAllParsing()

void wizard::Project::WaitForAllParsing ( )

◆ WaitForParseResults()

◆ WaitForParsing()

void wizard::Project::WaitForParsing ( )

Waits until the parsing thread is complete. This should only be called from the main thread.

Referenced by wizard::RenameFileDialog::UpdateList().

◆ WorkingDirectory()

◆ ParseWorker

friend class ParseWorker
friend

◆ ProjectParseThread

friend class ProjectParseThread
friend

◆ ProjectWorkspace

friend class ProjectWorkspace
friend

Member Data Documentation

◆ MainFileListChange

UtCallbackListN<void()> wizard::Project::MainFileListChange

◆ ParseUpdated

UtCallbackListN<void(bool)> wizard::Project::ParseUpdated

Called whenever a parse is complete, as many as once per source modification.

◆ ParseUpdatedDeferred

UtCallbackListN<void(bool)> wizard::Project::ParseUpdatedDeferred

Called after a short period of delay after editing when the parse is complete. This should be used if more expensive computations are required

Referenced by wizard::RevisionStore::Open().

◆ ProjectClosing

UtCallbackListN< void(wizard::Project *)> wizard::Project::ProjectClosing
static

Referenced by CloseProject().

◆ RegisterComponents

UtCallbackListN< void(wizard::Project *)> wizard::Project::RegisterComponents
static

Referenced by Project().


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved