IValidator.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 : IValidator interface used to check objects for warnings and errors
  9. // Report missing resources or invalid files.
  10. #pragma once
  11. # define MAX_WARNING_LENGTH 4096
  12. static_assert(MAX_WARNING_LENGTH>32,"MAX_WARNING_LENGTH should be bigger than 32");
  13. #define ERROR_CANT_FIND_CENTRAL_DIRECTORY "Cannot find Central Directory Record in pak. This is either not a pak file, or a pak file without Central Directory. It does not mean that the data is permanently lost, but it may be severely damaged. Please repair the file with external tools, there may be enough information left to recover the file completely."
  14. enum EValidatorSeverity : int
  15. {
  16. VALIDATOR_ERROR,
  17. VALIDATOR_ERROR_DBGBRK, // will __debugbreak() if sys_error_debugbreak is 1
  18. VALIDATOR_WARNING,
  19. VALIDATOR_COMMENT
  20. };
  21. enum EValidatorModule : int
  22. {
  23. VALIDATOR_MODULE_UNKNOWN,
  24. VALIDATOR_MODULE_RENDERER,
  25. VALIDATOR_MODULE_3DENGINE,
  26. VALIDATOR_MODULE_ASSETS,
  27. VALIDATOR_MODULE_SYSTEM,
  28. VALIDATOR_MODULE_AUDIO,
  29. VALIDATOR_MODULE_MOVIE,
  30. VALIDATOR_MODULE_EDITOR,
  31. VALIDATOR_MODULE_NETWORK,
  32. VALIDATOR_MODULE_PHYSICS,
  33. VALIDATOR_MODULE_RESERVED, // formerly VALIDATOR_MODULE_FLOWGRAPH
  34. VALIDATOR_MODULE_FEATURETESTS,
  35. VALIDATOR_MODULE_ONLINE,
  36. VALIDATOR_MODULE_SHINE,
  37. VALIDATOR_MODULE_DRS,
  38. };
  39. enum EValidatorFlags
  40. {
  41. VALIDATOR_FLAG_FILE = 0x0001, // Indicate that required file was not found or file was invalid.
  42. VALIDATOR_FLAG_TEXTURE = 0x0002, // Problem with texture.
  43. VALIDATOR_FLAG_SCRIPT = 0x0004, // Problem with script.
  44. VALIDATOR_FLAG_AUDIO = 0x0008, // Problem with audio.
  45. VALIDATOR_FLAG_AI = 0x0010, // Problem with AI.
  46. VALIDATOR_FLAG_LOG_ASSET_SCOPE = 0x0020, // Log asset scope with the warning.
  47. VALIDATOR_FLAG_IGNORE_IN_EDITOR = 0x0040, // Do not log this with the editor
  48. VALIDATOR_FLAG_SKIP_VALIDATOR = 0x0080, // Do not call validator's Report()
  49. };