RemoveMeshCommand.cpp dnacalib/commands/RemoveMeshCommand.h dnacalib/CommandImplBase.h dnacalib/dna/DNA.h dnacalib/dna/DNACalibDNAReaderImpl.h dnacalib/types/Aliases.h dnac::RemoveMeshCommand::Impl dnac //CopyrightEpicGames,Inc.AllRightsReserved. #include"dnacalib/commands/RemoveMeshCommand.h" #include"dnacalib/CommandImplBase.h" #include"dnacalib/dna/DNA.h" #include"dnacalib/dna/DNACalibDNAReaderImpl.h" #include"dnacalib/types/Aliases.h" namespacednac{ classRemoveMeshCommand::Impl:publicCommandImplBase<Impl>{ private: usingSuper=CommandImplBase<Impl>; public: explicitImpl(MemoryResource*memRes_): Super{memRes_}, meshIndex{std::numeric_limits<std::uint16_t>::max()}{ } voidsetMeshIndex(std::uint16_tmeshIndex_){ meshIndex=meshIndex_; } voidrun(DNACalibDNAReaderImpl*output){ output->removeMesh(meshIndex); } private: std::uint16_tmeshIndex; }; RemoveMeshCommand::RemoveMeshCommand(MemoryResource*memRes):pImpl{makeScoped<Impl>(memRes)}{ } RemoveMeshCommand::RemoveMeshCommand(std::uint16_tmeshIndex,MemoryResource*memRes): pImpl{makeScoped<Impl>(memRes)}{ pImpl->setMeshIndex(meshIndex); } RemoveMeshCommand::~RemoveMeshCommand()=default; RemoveMeshCommand::RemoveMeshCommand(RemoveMeshCommand&&)=default; RemoveMeshCommand&RemoveMeshCommand::operator=(RemoveMeshCommand&&)=default; voidRemoveMeshCommand::setMeshIndex(std::uint16_tmeshIndex){ pImpl->setMeshIndex(meshIndex); } voidRemoveMeshCommand::run(DNACalibDNAReader*output){ pImpl->run(static_cast<DNACalibDNAReaderImpl*>(output)); } }//namespacednac