MultiplayerCompressionFactory.h 980 B

123456789101112131415161718192021222324252627282930313233
  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/Component/Component.h>
  10. #include <AzCore/std/smart_ptr/unique_ptr.h>
  11. #include <AzNetworking/Framework/ICompressor.h>
  12. namespace MultiplayerCompression
  13. {
  14. class MultiplayerCompressionFactory
  15. : public AzNetworking::ICompressorFactory
  16. {
  17. public:
  18. //! Instantiate a new compressor
  19. //! @return A unique_ptr to a new Compressor
  20. AZStd::unique_ptr<AzNetworking::ICompressor> Create() override;
  21. //! Gets the string name of this compressor factory
  22. //! @return the string name of this compressor factory
  23. const AZStd::string_view GetFactoryName() const override;
  24. private:
  25. static constexpr AZStd::string_view s_compressorName = "MultiplayerCompressor";
  26. };
  27. }