#pragma once #include #include #include class CComponentPriority { public: virtual ~CComponentPriority() = default; virtual int GetSortingKey() const = 0; virtual bool ShouldExecuteAfter(const std::string& other) const; virtual int GetGroup() const; //TODO what is it supposed to mean? }; class CDefaultPriority : public CComponentPriority { public: int GetSortingKey() const override; }; class CIndexedPriority : public CComponentPriority { public: CIndexedPriority(int priority = 0); int GetSortingKey() const override; private: int Priority = 0; }; class CFirstPriority : public CComponentPriority { public: int GetSortingKey() const override; }; class CLastPriority : public CComponentPriority { public: int GetSortingKey() const override; }; class CAfterPriority : public CComponentPriority { public: CAfterPriority(std::vector deps); int GetSortingKey() const override; bool ShouldExecuteAfter(const std::string& other) const override; private: std::vector Dependencies; };