MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / ScopedAlignmentContext

Method ScopedAlignmentContext

dds/DCPS/Serializer.cpp:169–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169Serializer::ScopedAlignmentContext::ScopedAlignmentContext(Serializer& ser, size_t min_read)
170 : ser_(ser)
171 , max_align_(ser.encoding().max_align())
172 , start_rpos_(ser.rpos())
173 , rblock_((max_align_ && ser.current_) ? (reinterpret_cast<size_t>(ser.current_->rd_ptr()) - ser.align_rshift_) % max_align_ : 0)
174 , min_read_(min_read)
175 , start_wpos_(ser.wpos())
176 , wblock_((max_align_ && ser.current_) ? (reinterpret_cast<size_t>(ser.current_->wr_ptr()) - ser.align_wshift_) % max_align_ : 0)
177{
178 ser_.reset_alignment();
179}
180
181void
182Serializer::ScopedAlignmentContext::restore(Serializer& ser) const

Callers

nothing calls this directly

Calls 1

reset_alignmentMethod · 0.80

Tested by

no test coverage detected