#ifndef SOURCE_GROUP_SETTINGS_H #define SOURCE_GROUP_SETTINGS_H #include #include #include "LanguageType.h" #include "SourceGroupStatusType.h" #include "SourceGroupType.h" class ConfigManager; class FilePath; class ProjectSettings; class SourceGroupSettings { public: static const size_t s_version; static const std::string s_keyPrefix; SourceGroupSettings(const std::string& id, SourceGroupType type, const ProjectSettings* projectSettings); virtual ~SourceGroupSettings() = default; virtual std::shared_ptr createCopy() const = 0; virtual void load(std::shared_ptr config); virtual void save(std::shared_ptr config); virtual bool equals(std::shared_ptr other) const; std::string getId() const; void setId(const std::string& id); SourceGroupType getType() const; LanguageType getLanguage() const; std::string getName() const; void setName(const std::string& name); SourceGroupStatusType getStatus() const; void setStatus(SourceGroupStatusType status); FilePath getProjectDirectoryPath() const; FilePath makePathExpandedAndAbsolute(const FilePath& path) const; std::vector makePathsExpandedAndAbsolute(const std::vector& paths) const; protected: const ProjectSettings* m_projectSettings; private: std::string m_id; std::string m_name; const SourceGroupType m_type; SourceGroupStatusType m_status; }; #endif // SOURCE_GROUP_SETTINGS_H