/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #include "ArchiveWriterFactory.h" #include #include #include namespace Archive { // Implement TypeInfo, Rtti and Allocator support AZ_TYPE_INFO_WITH_NAME_IMPL(ArchiveWriterFactory, "ArchiveWriterFactory", ArchiveWriterFactoryTypeId); AZ_RTTI_NO_TYPE_INFO_IMPL(ArchiveWriterFactory, IArchiveWriterFactory); AZ_CLASS_ALLOCATOR_IMPL(ArchiveWriterFactory, AZ::SystemAllocator); // ArchiveWriter forwarding functions // This is used to create an ArchiveWriter instance that is pointed // to from an IArchiveWriter* to allow use of the ArchiveWriter in modules outside of the Archive Gem AZStd::unique_ptr ArchiveWriterFactory::Create() const { return AZStd::make_unique(); } AZStd::unique_ptr ArchiveWriterFactory::Create(const ArchiveWriterSettings& writerSettings) const { return AZStd::make_unique(writerSettings); } AZStd::unique_ptr ArchiveWriterFactory::Create(AZ::IO::PathView archivePath, const ArchiveWriterSettings& writerSettings) const { return AZStd::make_unique(archivePath, writerSettings); } AZStd::unique_ptr ArchiveWriterFactory::Create(IArchiveWriter::ArchiveStreamPtr archiveStream, const ArchiveWriterSettings& writerSettings) const { return AZStd::make_unique(AZStd::move(archiveStream), writerSettings); } } // namespace Archive