RemoveAnimatedMapCommand.cpp dnacalib/commands/RemoveAnimatedMapCommand.h dnacalib/CommandImplBase.h dnacalib/dna/DNA.h dnacalib/dna/DNACalibDNAReaderImpl.h dnacalib/types/Aliases.h dnac::RemoveAnimatedMapCommand::Impl dnac //CopyrightEpicGames,Inc.AllRightsReserved. #include"dnacalib/commands/RemoveAnimatedMapCommand.h" #include"dnacalib/CommandImplBase.h" #include"dnacalib/dna/DNA.h" #include"dnacalib/dna/DNACalibDNAReaderImpl.h" #include"dnacalib/types/Aliases.h" namespacednac{ classRemoveAnimatedMapCommand::Impl:publicCommandImplBase<Impl>{ private: usingSuper=CommandImplBase<Impl>; public: explicitImpl(MemoryResource*memRes_): Super{memRes_}, animatedMapIndices{memRes_}{ } voidsetAnimatedMapIndex(std::uint16_tanimatedMapIndex_){ animatedMapIndices.resize(1); animatedMapIndices[0]=animatedMapIndex_; } voidsetAnimatedMapIndices(ConstArrayView<std::uint16_t>animatedMapIndices_){ animatedMapIndices.assign(animatedMapIndices_.begin(),animatedMapIndices_.end()); } voidrun(DNACalibDNAReaderImpl*output){ output->removeAnimatedMaps(ConstArrayView<std::uint16_t>{animatedMapIndices}); } private: Vector<std::uint16_t>animatedMapIndices; }; RemoveAnimatedMapCommand::RemoveAnimatedMapCommand(MemoryResource*memRes):pImpl{makeScoped<Impl>(memRes)}{ } RemoveAnimatedMapCommand::RemoveAnimatedMapCommand(std::uint16_tanimatedMapIndex,MemoryResource*memRes): pImpl{makeScoped<Impl>(memRes)}{ pImpl->setAnimatedMapIndex(animatedMapIndex); } RemoveAnimatedMapCommand::RemoveAnimatedMapCommand(ConstArrayView<std::uint16_t>animatedMapIndices,MemoryResource*memRes): pImpl{makeScoped<Impl>(memRes)}{ pImpl->setAnimatedMapIndices(animatedMapIndices); } RemoveAnimatedMapCommand::~RemoveAnimatedMapCommand()=default; RemoveAnimatedMapCommand::RemoveAnimatedMapCommand(RemoveAnimatedMapCommand&&)=default; RemoveAnimatedMapCommand&RemoveAnimatedMapCommand::operator=(RemoveAnimatedMapCommand&&)=default; voidRemoveAnimatedMapCommand::setAnimatedMapIndex(std::uint16_tanimatedMapIndex){ pImpl->setAnimatedMapIndex(animatedMapIndex); } voidRemoveAnimatedMapCommand::setAnimatedMapIndices(ConstArrayView<std::uint16_t>animatedMapIndices){ pImpl->setAnimatedMapIndices(animatedMapIndices); } voidRemoveAnimatedMapCommand::run(DNACalibDNAReader*output){ pImpl->run(static_cast<DNACalibDNAReaderImpl*>(output)); } }//namespacednac