logic: implemented disabling of source groups

* added source group status (enabled/disabled)
* fixed bug where the removal of an indexed directory has not affected the files to clear
* added lots of const and override keywords in SourceGroupSettings
This commit is contained in:
mlangkabel
2018-01-15 14:39:15 +01:00
parent c569f921a2
commit cad064b9da
28 changed files with 268 additions and 112 deletions
+8 -8
View File
@@ -6,6 +6,7 @@
#include <vector>
#include "settings/LanguageType.h"
#include "settings/SourceGroupStatusType.h"
#include "settings/SourceGroupType.h"
#include "utility/file/FilePath.h"
@@ -18,28 +19,27 @@ public:
virtual ~SourceGroup();
virtual SourceGroupType getType() const = 0;
SourceGroupStatusType getStatus() const;
LanguageType getLanguage() const;
virtual bool prepareIndexing();
void fetchAllSourceFilePaths();
std::set<FilePath> getIndexedPaths() const;
std::set<FilePath> getExcludedPaths() const;
std::set<FilePath> getAllSourceFilePaths() const;
std::set<FilePath> getSourceFilePathsToIndex(const std::set<FilePath>& staticSourceFilePaths);
std::set<FilePath> getSourceFilePathsToIndex(const std::set<FilePath>& staticSourceFilePaths) const;
virtual std::vector<std::shared_ptr<IndexerCommand>> getIndexerCommands(const std::set<FilePath>& filesToIndex) = 0;
protected:
std::set<FilePath> getIndexedPaths();
std::set<FilePath> getExcludedPaths();
virtual std::vector<std::shared_ptr<IndexerCommand>> getIndexerCommands(const std::set<FilePath>& filesToIndex) const = 0;
std::set<FilePath> m_allSourceFilePaths;
private:
virtual std::shared_ptr<SourceGroupSettings> getSourceGroupSettings() = 0;
virtual std::shared_ptr<const SourceGroupSettings> getSourceGroupSettings() const = 0;
virtual std::vector<FilePath> getAllSourcePaths() const = 0;
std::set<FilePath> findAndAddSymlinkedDirectories(const std::vector<FilePath>& paths);
std::set<FilePath> findAndAddSymlinkedDirectories(const std::vector<FilePath>& paths) const;
};
#endif // SOURCE_GROUP_H