#pragma once #include namespace WallpaperEngine::Render::Shaders::Parameters { class CShaderParameter { public: CShaderParameter (void* defaultValue, void* value, std::string type); 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; } const std::string& getIdentifierName () const; const std::string& getName () const; void setIdentifierName (std::string identifierName); void setName (std::string name); const void* getValue () const; virtual const int getSize () const = 0; protected: void setValue (void* value); private: std::string m_identifierName; std::string m_name; std::string m_type; void* m_defaultValue; void* m_value; }; }