#ifndef SOURCE_GROUP_H #define SOURCE_GROUP_H #include #include #include #include "LanguageType.h" #include "SourceGroupStatusType.h" #include "SourceGroupType.h" class DialogView; class FilePath; class FilePathFilter; class IndexerCommand; class IndexerCommandProvider; class SourceGroupSettings; class StorageProvider; class Task; class SourceGroup { public: virtual ~SourceGroup() = default; virtual bool prepareIndexing(); virtual bool allowsPartialClearing() const; virtual std::set filterToContainedFilePaths(const std::set& filePaths) const = 0; virtual std::set getAllSourceFilePaths() const = 0; virtual std::shared_ptr getIndexerCommandProvider(const std::set& filesToIndex) const; virtual std::vector> getIndexerCommands(const std::set& filesToIndex) const = 0; virtual std::shared_ptr getPreIndexTask( std::shared_ptr storageProvider, std::shared_ptr dialogView) const; SourceGroupType getType() const; LanguageType getLanguage() const; SourceGroupStatusType getStatus() const; std::set filterToContainedSourceFilePath(const std::set& staticSourceFilePaths) const; bool containsSourceFilePath(const FilePath& sourceFilePath) const; protected: virtual std::shared_ptr getSourceGroupSettings() = 0; virtual std::shared_ptr getSourceGroupSettings() const = 0; std::set filterToContainedFilePaths( const std::set& filePaths, const std::set& indexedFilePaths, const std::set& indexedFileOrDirectoryPaths, const std::vector& excludeFilters) const; }; #endif // SOURCE_GROUP_H