LevelIndependentFileMan.h 991 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #ifndef CRYINCLUDE_EDITOR_LEVELINDEPENDENTFILEMAN_H
  9. #define CRYINCLUDE_EDITOR_LEVELINDEPENDENTFILEMAN_H
  10. #pragma once
  11. struct ILevelIndependentFileModule
  12. {
  13. // this function should prompt some message box if changed files need to be saved
  14. // if return false, editor will not continue with current action (e.g close the editor)
  15. virtual bool PromptChanges() = 0;
  16. };
  17. class CLevelIndependentFileMan
  18. {
  19. public:
  20. CLevelIndependentFileMan();
  21. ~CLevelIndependentFileMan();
  22. bool PromptChangedFiles();
  23. void RegisterModule(ILevelIndependentFileModule* pModule);
  24. void UnregisterModule(ILevelIndependentFileModule* pModule);
  25. private:
  26. std::vector<ILevelIndependentFileModule* > m_Modules;
  27. };
  28. #endif // CRYINCLUDE_EDITOR_LEVELINDEPENDENTFILEMAN_H