#pragma once #include #include "CProject.h" namespace WallpaperEngine::Core { class CProject; class CWallpaper { public: template const T* as () const { assert (is ()); return reinterpret_cast (this); } template T* as () { assert (is ()); return reinterpret_cast (this); } template bool is () { return this->m_type == T::Type; } CWallpaper (std::string type, CProject& project); CProject& getProject () const; protected: friend class CProject; private: CProject& m_project; std::string m_type; }; } // namespace WallpaperEngine::Core