AWSApiJob.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. #pragma once
  9. #include <AzCore/Jobs/Job.h>
  10. #include <Framework/AWSApiJobConfig.h>
  11. namespace AWSCore
  12. {
  13. /// Base class for all AWS jobs. Primarily exists so that
  14. /// AwsApiJob::s_config can be used for settings that apply to
  15. /// all AWS jobs.
  16. class AwsApiJob
  17. : public AZ::Job
  18. {
  19. public:
  20. // To use a different allocator, extend this class and use this macro.
  21. AZ_CLASS_ALLOCATOR(AwsApiJob, AZ::SystemAllocator);
  22. using IConfig = IAwsApiJobConfig;
  23. using Config = AwsApiJobConfig;
  24. static Config* GetDefaultConfig();
  25. protected:
  26. AwsApiJob(bool isAutoDelete, IConfig* config = GetDefaultConfig());
  27. ~AwsApiJob() override = default;
  28. /// Used for error messages.
  29. static const char* COMPONENT_DISPLAY_NAME;
  30. };
  31. } // namespace AWSCore