EditorMeshStatsSerializer.cpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. #include <AzCore/Serialization/Json/JsonSerializationResult.h>
  9. #include <Mesh/EditorMeshStatsSerializer.h>
  10. namespace AZ
  11. {
  12. namespace Render
  13. {
  14. AZ_CLASS_ALLOCATOR_IMPL(JsonEditorMeshStatsSerializer, AZ::SystemAllocator);
  15. JsonSerializationResult::Result JsonEditorMeshStatsSerializer::Load(
  16. [[maybe_unused]] void* outputValue,
  17. [[maybe_unused]] const Uuid& outputValueTypeId,
  18. [[maybe_unused]] const rapidjson::Value& inputValue,
  19. JsonDeserializerContext& context)
  20. {
  21. namespace JSR = JsonSerializationResult;
  22. JSR::ResultCode result(JSR::Tasks::ReadField);
  23. return context.Report(
  24. result,
  25. "Successfully loaded EditorMeshStats information.");
  26. }
  27. JsonSerializationResult::Result JsonEditorMeshStatsSerializer::Store(
  28. [[maybe_unused]] rapidjson::Value& outputValue,
  29. [[maybe_unused]] const void* inputValue,
  30. [[maybe_unused]] const void* defaultValue,
  31. [[maybe_unused]] const Uuid& valueTypeId,
  32. JsonSerializerContext& context)
  33. {
  34. namespace JSR = JsonSerializationResult;
  35. JSR::ResultCode result(JSR::Tasks::WriteValue);
  36. return context.Report(
  37. result,
  38. "Successfully stored EditorMeshStats information.");
  39. }
  40. } // namespace Render
  41. } // namespace AZ