Files
Sourcetrail/src/lib/project/Project.h
T
Eberhard Graether f9e4afda77 logic: Added indexing mode to reindex incomplete files (issue #493, #496)
* added radio buttons to start indexing dialog
* don't block task scheduler thread while start indexing dialog is visible
* don't force whole project refresh on settings change
* added help button to start indexing dialog explaining indexing modes
* disable unavailable modes when project needs full refresh
* improved label texts on indexing dialogs
* added --incomplete flag to index command of commandline API
* fixed deletion of window stack elements
2017-12-03 22:30:09 +01:00

73 lines
1.6 KiB
C++

#ifndef PROJECT_H
#define PROJECT_H
#include <memory>
#include <string>
#include <set>
#include <vector>
#include "project/RefreshInfo.h"
#include "project/SourceGroup.h"
struct FileInfo;
class DialogView;
class FilePath;
class PersistentStorage;
class ProjectSettings;
class StorageCache;
class Project
{
public:
Project(std::shared_ptr<ProjectSettings> settings, StorageCache* storageCache, bool hasGUI);
virtual ~Project();
FilePath getProjectSettingsFilePath() const;
std::string getDescription() const;
bool settingsEqualExceptNameAndLocation(const ProjectSettings& otherSettings) const;
void setStateSettingsUpdated();
void load();
void refresh(DialogView* dialogView, RefreshMode refreshMode);
RefreshInfo getRefreshInfo(RefreshMode mode) const;
void buildIndex(const RefreshInfo& info);
private:
enum ProjectStateType
{
PROJECT_STATE_NOT_LOADED,
PROJECT_STATE_EMPTY,
PROJECT_STATE_LOADED,
PROJECT_STATE_OUTDATED,
PROJECT_STATE_OUTVERSIONED,
PROJECT_STATE_SETTINGS_UPDATED,
PROJECT_STATE_NEEDS_MIGRATION
};
Project(const Project&);
std::set<FilePath> getAllSourceFilePaths() const;
RefreshInfo getRefreshInfoForUpdatedFiles() const;
RefreshInfo getRefreshInfoForIncompleteFiles() const;
RefreshInfo getRefreshInfoForAllFiles() const;
bool hasCxxSourceGroup() const;
bool didFileChange(const FileInfo& info) const;
std::shared_ptr<ProjectSettings> m_settings;
StorageCache* const m_storageCache;
ProjectStateType m_state;
std::shared_ptr<PersistentStorage> m_storage;
std::vector<std::shared_ptr<SourceGroup>> m_sourceGroups;
bool m_hasGUI;
};
#endif // PROJECT_H