IErrorReport.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. // Description : Class that collects error reports to present them later.
  9. #pragma once
  10. // forward declarations.
  11. class CParticleItem;
  12. class CErrorRecord;
  13. class QString;
  14. /*! Error report manages collection of errors occurred during map analyzes or level load.
  15. */
  16. struct IErrorReport
  17. {
  18. virtual ~IErrorReport(){}
  19. //! If enabled errors are reported immediately and not stored.
  20. virtual void SetImmediateMode(bool bEnable) = 0;
  21. virtual bool IsImmediateMode() const = 0;
  22. virtual void SetShowErrors(bool bShowErrors = true) = 0;
  23. //! Adds new error to report.
  24. virtual void ReportError(CErrorRecord& err) = 0;
  25. //! Check if error report have any errors.
  26. virtual bool IsEmpty() const = 0;
  27. //! Get number of contained error records.
  28. virtual int GetErrorCount() const = 0;
  29. //! Get access to indexed error record.
  30. virtual CErrorRecord& GetError(int i) = 0;
  31. //! Clear all error records.
  32. virtual void Clear() = 0;
  33. //! Display dialog with all errors.
  34. virtual void Display() = 0;
  35. //! Assign current filename.
  36. virtual void SetCurrentFile(const QString& file) = 0;
  37. };