NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
VersionControlSystemManager Class Reference

#include <vcsmanager.hpp>

Collaboration diagram for VersionControlSystemManager:

Public Member Functions

 VersionControlSystemManager (NumeReWindow *parent)
 
FileRevisionsgetRevisions (const wxString &currentFile)
 This method returns the file revisions as pointer. More...
 
bool hasRevisions (const wxString &currentFile)
 This method detects, whether the selected file has revisions. More...
 
wxString getRevisionPath (const wxString &currentFilePath)
 This method returns the path, where the revisions are stored. More...
 

Private Attributes

NumeReWindowm_parent
 

Detailed Description

Definition at line 28 of file vcsmanager.hpp.

Constructor & Destructor Documentation

◆ VersionControlSystemManager()

VersionControlSystemManager::VersionControlSystemManager ( NumeReWindow parent)
inline

Definition at line 34 of file vcsmanager.hpp.

Member Function Documentation

◆ getRevisionPath()

wxString VersionControlSystemManager::getRevisionPath ( const wxString &  currentFilePath)

This method returns the path, where the revisions are stored.

Parameters
currentFilePathconst wxString&
Returns
wxString

The revision path is located in a subfolder called "/.revisions/", which is hidden and mirrors the files in their revision files. This function will only return a path for files belonging to the current standard folders.

Definition at line 39 of file vcsmanager.cpp.

References NumeReWindow::getPathDefs(), LOADPATH, m_parent, and replacePathSeparator().

Referenced by getRevisions(), hasRevisions(), NumeReDropTarget::OnData(), and NumeReWindow::renameFile().

Here is the call graph for this function:

◆ getRevisions()

FileRevisions * VersionControlSystemManager::getRevisions ( const wxString &  currentFile)

This method returns the file revisions as pointer.

Parameters
currentFileconst wxString&
Returns
FileRevisions*

The FileRevisions object is created on the heap and the calling function is responsible for cleaning up this allocated block of memory (use std::unique_ptr for simplification). If this file cannot have a revision, because it does not belong to the current standard folders, a nullptr is returned instead.

Definition at line 68 of file vcsmanager.cpp.

References getRevisionPath().

Referenced by NumeReDropTarget::OnData(), NumeReWindow::OnFileEventTimer(), NumeReWindow::OnShowRevisions(), NumeReWindow::OnShowRevisionsFromTab(), NumeReWindow::OnTagCurrentRevision(), NumeReWindow::OnTreeItemToolTip(), NumeReWindow::renameFile(), NumeReEditor::SaveFile(), and PackageDialog::saveProjectFile().

Here is the call graph for this function:

◆ hasRevisions()

bool VersionControlSystemManager::hasRevisions ( const wxString &  currentFile)

This method detects, whether the selected file has revisions.

Parameters
currentFileconst wxString&
Returns
bool

Use this method for detecting, whether the selected file has any revisions. The method getRevisions() will not work, because the constructor of the FileRevisions class will try to create everything upon construction.

Definition at line 90 of file vcsmanager.cpp.

References getRevisionPath().

Referenced by NumeReDropTarget::OnData(), NumeReWindow::OnFileEventTimer(), EditorNotebook::OnTabRightClicked(), NumeReWindow::OnTreeItemRightClick(), NumeReWindow::OnTreeItemToolTip(), and NumeReWindow::renameFile().

Here is the call graph for this function:

Member Data Documentation

◆ m_parent

NumeReWindow* VersionControlSystemManager::m_parent
private

Definition at line 31 of file vcsmanager.hpp.

Referenced by getRevisionPath().


The documentation for this class was generated from the following files: