#pragma once #include "../CommandHistory.h" #include #include namespace UsdLayerManager { /// Type-agnostic attribute set command. /// Stores execute and undo as std::function closures capturing the typed values. class AttributeSetCommand : public ICommand { public: AttributeSetCommand(std::string description, std::function executeFunc, std::function undoFunc); void Execute() override { if (m_executeFunc) m_executeFunc(); } void Undo() override { if (m_undoFunc) m_undoFunc(); } std::string GetDescription() const override { return m_description; } private: std::string m_description; std::function m_executeFunc; std::function m_undoFunc; }; } // namespace UsdLayerManager