Files
Sourcetrail/src/lib/project/SourceGroup.h
T
mlangkabel cad064b9da 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
2018-01-15 14:39:15 +01:00

46 lines
1.3 KiB
C++

#ifndef SOURCE_GROUP_H
#define SOURCE_GROUP_H
#include <memory>
#include <set>
#include <vector>
#include "settings/LanguageType.h"
#include "settings/SourceGroupStatusType.h"
#include "settings/SourceGroupType.h"
#include "utility/file/FilePath.h"
class IndexerCommand;
class SourceGroupSettings;
class SourceGroup
{
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) const;
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) const;
};
#endif // SOURCE_GROUP_H