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