NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
#include <vcsmanager.hpp>
Public Member Functions | |
VersionControlSystemManager (NumeReWindow *parent) | |
FileRevisions * | getRevisions (const wxString ¤tFile) |
This method returns the file revisions as pointer. More... | |
bool | hasRevisions (const wxString ¤tFile) |
This method detects, whether the selected file has revisions. More... | |
wxString | getRevisionPath (const wxString ¤tFilePath) |
This method returns the path, where the revisions are stored. More... | |
Private Attributes | |
NumeReWindow * | m_parent |
Definition at line 28 of file vcsmanager.hpp.
|
inline |
Definition at line 34 of file vcsmanager.hpp.
wxString VersionControlSystemManager::getRevisionPath | ( | const wxString & | currentFilePath | ) |
This method returns the path, where the revisions are stored.
currentFilePath | const 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().
FileRevisions * VersionControlSystemManager::getRevisions | ( | const wxString & | currentFile | ) |
This method returns the file revisions as pointer.
currentFile | const wxString& |
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().
bool VersionControlSystemManager::hasRevisions | ( | const wxString & | currentFile | ) |
This method detects, whether the selected file has revisions.
currentFile | const wxString& |
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().
|
private |
Definition at line 31 of file vcsmanager.hpp.
Referenced by getRevisionPath().